Node Linter

Installation

npm install ncss-linter

Usage

bin/ncss-linter [options]

-V, --version
-C, --config <config>
-H, --html <html>
-P, --path <path>
-U, --url <url>
-N, --namespace <namespace>
-E, --separator <separator>
-S, --selector <selector>
-L, --log-level <log-level>
-V, --threshold-error <threshold-error>
-W, --threshold-warn <threshold-warn>
-Y, --halt-on-error   
-Z, --halt-on-warn
-h, --help

Examples

Validate using a configuration file:

bin/ncss-linter --config=.ncsslintrc

Validate a HTML string:

bin/ncss-linter --html='<div class="box-content"></div>'

Validate a local path:

bin/ncss-linter --path=templates/**/*.html --namespace=foo

Validate a remote URL:

bin/ncss-linter --url=https://redaxmedia.com --namespace=rs --log-level=info
Edit on GitHub

Grunt Linter

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
			}
		}
	}
}
Edit on GitHub