node package manager



Linting your scss with scsslint

Getting Started

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-scsslint --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


The "scsslint" task


This task requires you to have Ruby and scss-lint installed. If you're on OS X or Linux you probably already have Ruby installed; test with ruby -v in your terminal. When you've confirmed you have Ruby installed, run gem install scss-lint to install scss-lint.

In your project's Gruntfile, add a section named scsslint to the data object passed into grunt.initConfig().

  scsslint: {
    options: {
      // Options go here. 
    your_target: {
      // Target-specific file lists and/or options go here. 



Type: String

Path to the Yaml config file. See scss-lint#configuration


Type. String

Allows you to specify a glob pattern of files that should not be linted .


Type. String|Array

Specify which linters you don't want to run. A list of linters can be found here


Type. String|Array

Specify which linters you want to run. A list of linters can be found here


Type: Boolean Default: false

Run scss-lint with bundle exec: bundle exec scss-lint.

Usage Examples

Example config

  scsslint: {
    dist: {
      src: ['./app/style/main.scss'],
grunt.registerTask('default', ['scsslint']);


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 0.1.0 Rewrite. Using scsslint. Moved tests there.
  • 0.0.8 Fixed bug introdruced in 0.0.7 where not all files where processed.
  • 0.0.7 ignore folders
  • 0.0.6 Added more tests
  • 0.0.5 Rewrote sass-lint handeling. Added simple tests.
  • 0.0.4 fix but where includeLinter|excludeLinter where not working correctly
  • 0.0.3 remove unnecessary newline in gruntlog
  • 0.0.2 add bundler support
  • 0.0.1 First Release


Copyright (c) 2014 Fabrice Weinberg. Licensed under the MIT license.