@josundt/sass-lint-config
v1.0.2
Published
Ruleset for sass (scss) code style and linting
Downloads
2
Readme
@josundt/sass-lint-config
Ruleset for sass (scss) code style and linting
Usage
Install this package
Add the following to your package.json file:
{ "sasslintConfig": "node_modules/@josundt/sass-lint-config/.sasslintrc" }
Add npm task in package.json
{ "scripts": { "lint:sass": "sass-lint src/**/*.scss --format visualstudio -v" }, }
When using Visual Studio Code:
a) Install the sass-lint extension ("glen-84.sass-lint"), and add it to the recommmended extensions for the workspace (".vscode/extensions.json").
b) Add a task in ".vscode/tasks.json" to run sass-lint as a VSCode task for the whole workspace:
{ "version": "2.0.0", "runner": "terminal", "tasks": [ { "label": "lint:sass", "type": "shell", "command": "npx", "args": [ "sass-lint", "src/**/*.scss", "--format", "stylish", "-v" ], "group": "build", "presentation": { "echo": true, "reveal": "silent", "focus": false, "panel": "shared" }, "problemMatcher": { "base": "$eslint-stylish", "fileLocation": [ "relative", "${workspaceRoot}" ], "source": "lint:sass" } } ] }