grunt-scsslint

raw JSON →
0.1.0 verified Fri May 01 auth: no javascript maintenance

Grunt plugin to lint SCSS files using scss-lint (Ruby gem). Version 0.1.0, last updated 2014. Requires Ruby and scss-lint gem to be installed separately. Provides options for config file, exclude/inlude linters, and bundle exec support. Less active compared to modern alternatives like stylelint for SCSS.

error Warning: Task "scsslint" not found. Use --force to continue.
cause grunt.loadNpmTasks('grunt-scsslint') not called or task not installed.
fix
Ensure 'grunt-scsslint' is in devDependencies and loadNpmTasks is in Gruntfile.
error Fatal error: scss-lint: command not found
cause Ruby gem scss-lint is not installed.
fix
Run 'gem install scss-lint' in terminal.
error Error: Cannot find module 'grunt-scsslint'
cause Package not installed or not in node_modules.
fix
Run 'npm install grunt-scsslint --save-dev'.
gotcha Requires Ruby and scss-lint gem to be installed globally.
fix Install Ruby then run 'gem install scss-lint'.
deprecated The scss-lint Ruby gem is deprecated and no longer maintained.
fix Consider migrating to Dart Sass, stylelint, or other modern tools.
gotcha grunt-scsslint uses a Node.js wrapper for scss-lint, which may have compatibility issues with Node.js versions.
fix Use Node.js 0.8+ as specified; newer versions may cause issues.
npm install grunt-scsslint
yarn add grunt-scsslint
pnpm add grunt-scsslint

Shows basic Gruntfile configuration for the scsslint task with config file.

module.exports = function(grunt) {
  grunt.initConfig({
    scsslint: {
      options: {
        config: '.scss-lint.yml'
      },
      all: {
        src: ['src/**/*.scss']
      }
    }
  });
  grunt.loadNpmTasks('grunt-scsslint');
  grunt.registerTask('default', ['scsslint']);
};