Grunt NCSS Linter
Grunt enhanced linter for NCSS.
Installation
npm install grunt-ncss-linter
Usage
Load the task:
grunt.loadNpmTasks('grunt-ncss-linter');
Config the task:
grunt.initConfig(
{
ncsslint:
{
name:
{
options:
{
config: '.ncsslintrc',
html: null,
path: null,
url: null,
namespace: null,
separator: '-',
selector: '*',
logLevel: 'warn',
thresholdError: 0,
thresholdWarn: 0,
haltOnError: false,
haltOnWarn: false,
rules: null
}
}
}
});
Run the task:
grunt ncsslint
Options
Name | Type | Default | Mandatory |
---|---|---|---|
config | string | .ncsslintrc | optional |
html | string | null | required |
path | string | null | required |
url | string | null | required |
namespace | string | null | optional |
separator | string | - | optional |
selector | string | * | optional |
logLevel | string | warn | optional |
thresholdError | number | 0 | optional |
thresholdWarn | number | 0 | optional |
haltOnError | boolean | false | optional |
haltOnWarn | boolean | false | optional |
rules | object | optional |
Loggers
Name | Level | Value |
---|---|---|
Silent | 0 | null |
Error | 1 | error |
Warning | 2 | warn |
Info | 3 | info |