0.0.1 • Published 9 years ago
lesshint-color-variable-linter v0.0.1
Lesshint Color Variable Linter
Example
invalid
.foo {
color: red;
background-color: #000000;
border-color: rgb(0,0,0);
text-decoration-color: rgba(0,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-linterUsage
In your lesshint.json configuration add the following:
"colorAsVariable" : {
"enabled" : true,
"severity" : "warning"
}When running lesshint:
lesshint src/less/ lib/style.less --linters lesshint-color-variable-linterOptions
enabled: Turn on/off the linter rule. Valuestrueorfalse.severity: Severity levels of the linter. Valueserrororwarning. Default is set towarning.
0.0.1
9 years ago