gulp-scss-lint

raw JSON →
1.0.0 verified Fri May 01 auth: no javascript deprecated

Gulp plugin to validate .scss files using the Ruby-based scss-lint tool, wrapping it into a Gulp pipeline for linting SCSS stylesheets. Version 1.0.0, last updated 2016, with no recent releases. Works with Node >= 0.10 and requires Ruby and scss_lint gem installed separately. Offers options for config file, bundle exec, reporter output, maxBuffer, and endless mode for watch. Deprecated in favor of sass-lint or stylelint, as scss-lint is no longer maintained by its original authors. Release cadence: single stable release. Key differentiator vs JavaScript-based linters: leverages Ruby scss-lint's rule set.

error Error: spawn scss-lint ENOENT
cause scss-lint Ruby gem not installed or not found in PATH.
fix
Install scss-lint: gem install scss_lint and ensure Ruby is in PATH.
error throw new Error('scss-lint output buffer exceeded')
cause Default maxBuffer (300*1024) insufficient for large lint output.
fix
Add maxBuffer: 307200 to the scsslint() options (or higher).
error TypeError: scsslint is not a function
cause Using ES6 import syntax with named import instead of default import or require.
fix
Use const scsslint = require('gulp-scss-lint'); or import scsslint from 'gulp-scss-lint';
deprecated scss-lint (Ruby gem) is deprecated; its official repository archived in 2019. gulp-scss-lint is no longer maintained.
fix Migrate to a JavaScript-based linter like stylelint with scss plugin or sass-lint.
gotcha Requires Ruby and the scss_lint gem installed globally. Missing dependency leads to silent failures or 'command not found' errors.
fix Install Ruby and run `gem install scss_lint` before using this plugin.
gotcha The plugin does not support Node.js versions above 0.10 officially; may break on modern Node (>=12).
fix Use a child_process polyfill or update plugin; consider migrating to sass-lint.
gotcha maxBuffer default is 300*1024 bytes; if you hit 'maxBuffer exceeded', the error is not descriptive.
fix Increase maxBuffer option (e.g., 307200) in scsslint() config.
npm install gulp-scss-lint
yarn add gulp-scss-lint
pnpm add gulp-scss-lint

Creates a Gulp task that lints all .scss files in src/, using a custom config file and outputting a JSON report.

const gulp = require('gulp');
const scsslint = require('gulp-scss-lint');

gulp.task('scss-lint', function() {
  return gulp.src('src/**/*.scss')
    .pipe(scsslint({
      config: '.scss-lint.yml',
      bundleExec: false,
      reporterOutput: 'scssReport.json',
      maxBuffer: 307200
    }));
});

gulp.task('default', gulp.series('scss-lint'));