A Node-only Sass linter for both .sass and .scss syntax, providing over 70 configurable rules for code quality and consistency. Current stable version is 1.13.1, which reverts breaking changes from the mistakenly released 1.13.0 (which introduced a new AST parser and disabled-next-line feature). Development has slowed significantly since 2019, with no recent releases. Key differentiators include extensive configurability via YAML/JSON, a migration tool from SCSS-Lint, and performance-focused cache options. However, it has known issues with modern Sass syntax and is largely superseded by stylelint with scss plugins.
npm install sass-lintVerified import paths — ran on the pinned version, not inferred.
Basic example showing how to lint files and inline text using the Node API, with callback and output formatting.
Use v1.13.1 or later, and ensure config does not rely on any 1.13.0-specific features (e.g., disable-next-line may not work as expected).
Migrate to stylelint with stylelint-scss plugin for ongoing support.
Run with command: sass-lint --no-exit -q -c .sass-lint.yml
Disable problematic rules in config or adjust file patterns to exclude known edge cases.
Update to v1.12.1+ or configure the rule to ignore custom properties.
Run: npm install gonzales-pe-sl@1.0.0 --save-dev
Use stylelint with stylelint-scss instead, or avoid unsupported syntax and downgrade to Sass 3.x.
Move 'formatter' inside 'options' block in the config file or use CLI flag: sass-lint -f stylish
Check that the glob pattern is correct and files exist. Example: files.include: '**/*.s+(a|c)ss'