Lesshint Color Variable Linter
Example
invalid
.foo color: red; background-color: #000000; border-color: rgb0,0,0; text-decoration-color: rgba0,0,0,1;
valid
.foo color: @foo-color; background-color: @foo-background-color; border-color: @foo-border-color; text-decoration-color: @foo-decoration-color;
Install
$ npm install lesshint-color-variable-linter
Usage
In your lesshint.json configuration add the following:
"colorAsVariable" :
When running lesshint:
lesshint src/less/ lib/style.less --linters lesshint-color-variable-linter
Options
enabled
: Turn on/off the linter rule. Valuestrue
orfalse
.severity
: Severity levels of the linter. Valueserror
orwarning
. Default is set towarning
.