@liquify/stylelint-config
Shareable config for Stylelint to maintain a code style aesthetic in SASS/SCSS files across the Liquify project.
Install
pnpm add stylelint @liquify/stylelint-config -D
Stylelint is included as a dependency in the module. The same logic for all plugins.
Usage
We extend configuration from within package.json
files.
{
"stylelint": {
"extends": "@liquify/stylelint-config",
"ignoreFiles": ["**/node_modules"]
}
}
Text Editor (VSCode)
Install the stylelint.vscode-stylelint extension from the marketplace. Depending on how your editor is configured, one may require setting global configuration in a user settings.json
file:
{
"stylelint.validate": ["scss", "sass"],
"stylelint.packageManager": "pnpm",
"stylelint.enable": true,
"scss.validate": false, // important to disable vscode validation
"scss.scannerExclude": ["**/.git", "**/node_modules"],
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
}