Registry / devops / grunt-contrib-sass-lint

grunt-contrib-sass-lint

JSON →
library0.0.4jsnpmunverified

A Grunt task plugin to run sass-lint on your Sass/SCSS files. Version 0.0.4 is the last release, with no apparent update cadence. It wraps the sass-lint library and provides a config option to specify a lint configuration file. Compared to alternatives like grunt-sass-lint, this plugin is minimal but lacks active maintenance. It requires Node >= 5.3.0 and Grunt.

npm install grunt-contrib-sass-lint
INSTALL
IMPORT
SIG · GRUNT-CONTRIB-SASS
G
grunt-contrib-sass-lint
devopsjavascriptv0.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

grunt
grunt.loadNpmTasks('grunt-contrib-sass-lint');
grunt.loadNpmTasks('grunt-contrib-sass-lint')()
Standard Grunt plugin loading. Do not invoke as function.

Basic Grunt configuration to lint all .scss files under src/ with a custom config file.

// Gruntfile.js module.exports = function(grunt) { grunt.initConfig({ 'sass-lint': { options: { config: '.sass-lint.yml' }, target: ['src/**/*.scss'] } }); grunt.loadNpmTasks('grunt-contrib-sass-lint'); grunt.registerTask('default', ['sass-lint']); };
Debug
Known issues
deprecatedThis package is no longer maintained. sass-lint itself is deprecated in favor of stylelint with sass rules.
fix
Migrate to stylelint or another modern Sass linter.
affects: >=0.0.4
gotchaThe `config` option must be a string path to a YAML file. If not provided, it searches for `.sass-lint.yml` in cwd.
fix
Ensure config file exists at expected location or pass explicit path.
affects: >=0.0.1
gotchaThe source files must be passed as an array of strings (grunt file glob). No other options are supported.
fix
Use grunt.file.src or similar array.
affects: >=0.0.1
Errors
Common errors & fixes
Warning: Task "sass-lint" not found. Use --force to continue.
Grunt plugin not loaded or installed.
fix
Run `npm install grunt-contrib-sass-lint --save-dev` and add `grunt.loadNpmTasks('grunt-contrib-sass-lint');` to Gruntfile.
Fatal error: Cannot find module 'sass-lint'
Missing peer dependency sass-lint.
fix
Run `npm install sass-lint --save-dev` (or `--save` depending on needs).
Config file not found: .sass-lint.yml
The default config file does not exist in the current working directory.
fix
Create a `.sass-lint.yml` file or set the `config` option to an existing file path.
Upgrade
Version history
0.0.4latest on npm
Audit
Dependencies
sass-lintrequiredcore linting engine
Agent activity
4 hits · last 30 days
node
4
Resources
grunt-contrib-sass-lint — npm install grunt-contrib-sass-lint · libregistry