Linter for NCSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
src
tests
.eslintrc
.gitignore
.travis.yml
README.md
index.js
option.json
package.json
ruleset.json
wording.json

README.md

NCSS Linter

Linter for NCSS.

Build Status NPM Version License

Preview

Terminal Session

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

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

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

Loggers

Name Level Value
Silent 0 null
Error 1 error
Warning 2 warn
Info 3 info
Debug 4 debug