grunt-scss-lint

Validate `.scss` files with `scss-lint`.

npm install grunt-scss-lint
111 downloads in the last day
735 downloads in the last week
3 346 downloads in the last month

grunt-scss-lint

Build Status Code Climate NPM version

Lint your .scss files

Getting Started

This plugin requires Grunt >= 0.4.0 and scss-lint >= 0.18.0.

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-scss-lint --save-dev

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

grunt.loadNpmTasks('grunt-scss-lint');

Scss-lint task

Run this task with the grunt scsslint command.

scss-lint is a Ruby gem written by The Causes Engineering Team, this plugin is simply a grunt wrapper for the gem.

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 update --system && gem install scss-lint to install the scss-lint gem.

Options

config

Type: String Default: scss-lint's default config file.

Note that this isn't working correctly yet.

reporterOutput

Type: String Default: scss-lint-report.xml

The jUnit XML file to save the output to. If you don't want this then set the option as null.

Usage Examples

Example config

grunt.initConfig({
  scsslint: {
    allFiles: [
      'test/fixtures/*.scss',
    ],
    options: {
      config: '.scss-lint.yml',
      reporterOutput: 'scss-lint-report.xml'
    },
  }
});

grunt.loadNpmTasks('grunt-scss-lint');

grunt.registerTask('default', ['scsslint']);
npm loves you