.foo {
color: red;
background-color: #000000;
border-color: rgb(0,0,0);
text-decoration-color: rgba(0,0,0,1);
}
.foo {
color: @foo-color;
background-color: @foo-background-color;
border-color: @foo-border-color;
text-decoration-color: @foo-decoration-color;
}
$ npm install lesshint-color-variable-linter
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-linter
enabled
: Turn on/off the linter rule. Valuestrue
orfalse
.severity
: Severity levels of the linter. Valueserror
orwarning
. Default is set towarning
.