JSPM

  • Created
  • Published
  • Downloads 118444
  • Score
    100M100P100Q151377F
  • License MIT

All Node Sass linter!

Package Exports

  • sass-lint
  • sass-lint/bin/sass-lint
  • sass-lint/lib/config
  • sass-lint/lib/helpers
  • sass-lint/lib/rules

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sass-lint) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Sass Lint npm version Build Status

A Node-only Sass linter for both sass and scss syntax!

Install

npm install sass-lint --save-dev

Configuring

Copy the Sample Config to .sass-lint.yml from the root of where you are running Sass Lint from.

Options

The following are options that you can use to config the Sass Linter.

Files

The files option can either be set to a glob or it can be set to an object, where the key include is set to the glob you want to include, and ignore set to either a glob string or an array of glob strings that you would like to ignore.

Rules

For all rules, setting their severity to 0 turns it off, setting to 1 sets it as a warning (something that should not be committed in), and setting to 2 set it to an error (something that should not be written). If a rule is set to just a severity, it will use the default configuration (where available).

If you want to configure options, set the rule to an array, where the first item in the array is the severity, and the second item in the array is an object including the options you would like to set.

An example configuration of a rule with options look like the following:

indentation:
  - 2
  -
    size: 2

CLI

There currently is NO COMMAND LINE INTERFACE FOR SASS LINT. To get our 1.0 out the door, we focused on Task Runner Integration as that's where we saw the majoirty use case. Release 1.1 is where we have our CLI work slated for, so chck back there, especially the Add CLI issue

Creating Rules

Our AST is Gonzales-PE. Each rule will be passed the full AST which they can traverse as they please. There are many different node types that may be traversed, and an extensive API for working with nodes. The file of the rule must have the same name as the name of the rule. All of the available rules are in our rules directory. Default options will be merged in with user config.

Task Runner Integration