Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

NCSS Linter

Linter for NCSS.

Build Status NPM Version License

Preview

Terminal Session

Installation

Install on your system:

npm install ncss-linter --global --unsafe-perm=true

Setup

Create a .ncsslintrc file to override configuration:

{
	"html": null,
	"path": null,
	"url": null,
	"namespace": null,
	"separator": "-",
	"selector": "*",
	"logLevel": "warn",
	"thresholdError": 0,
	"thresholdWarn": 0,
	"haltOnError": false,
	"haltOnWarn": false
}

Usage

Run the command:

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 config file:

ncss-linter --config=.ncsslintrc

Validate a HTML string:

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

Validate a local path:

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

Validate a remote URL:

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

Releases

No releases published

Sponsor this project

 
Learn more about GitHub Sponsors

Packages

No packages published
You can’t perform that action at this time.