Closed kevincolten closed 7 years ago
I'm experiencing the same.
Me too, and even with command line options
Ok I just solved my problem.
The format of the .csslintrc
has changed.
It isn't a JSON file anymore. Instead you must use the command line options format, one line by option.
Here an example:
--errors=bulletproof-font-face,display-property-grouping,duplicate-background-images,duplicate-properties,empty-rules,floats,outline-none,font-faces,ids,import,important,known-properties,qualified-headings,regex-selectors,shorthand,star-property-hack,text-indent,underscore-property-hack,unique-headings,vendor-prefix,zero-units
--warnings=compatible-vendor-prefixes,fallback-colors,font-sizes,gradients,non-link-hover,overqualified-elements
--ignore=adjoining-classes,box-model,box-sizing,unqualified-attributes,universal-selector
Now it works for me.
@XhmikosR , I guess this issue can be closed now.
Looks like they still support .csslintrc
files, but with the added granularity of ignore, error, warning means you will need to add those grouping keys to your config file. E.x.
{
"ignore": [
"adjoining-classes"
],
"warnings": [
],
"errors": [
]
}
Because of the 3 possible levels per option, they just want a list of things, rather than requiring what is used under the hood.
When I change this, I now get:
/home/smoran/lib/node_modules/csslint/dist/csslint-node.js:3286
output += "\n" + message.evidence;
^
RangeError: Invalid string length
at /home/smoran/lib/node_modules/csslint/dist/csslint-node.js:3286:32
at Array.forEach (native)
at Object.CSSLint.Util.forEach (/home/smoran/lib/node_modules/csslint/dist/csslint-node.js:577:27)
at Object.CSSLint.addFormatter.formatResults (/home/smoran/lib/node_modules/csslint/dist/csslint-node.js:3278:22)
at processFile (/home/smoran/lib/node_modules/csslint/dist/cli.js:183:32)
at /home/smoran/lib/node_modules/csslint/dist/cli.js:264:36
at Array.forEach (native)
at processFiles (/home/smoran/lib/node_modules/csslint/dist/cli.js:262:23)
at cli (/home/smoran/lib/node_modules/csslint/dist/cli.js:401:14)
at Object.<anonymous> (/home/smoran/lib/node_modules/csslint/dist/cli.js:417:1)
My .csslintrc file is:
{
"errors": [
...errors
],
"ignore": [
...ignored rules
],
"warnings": [
...warnings
]
}
This is probably irrelevant, but I get the same error when I have no .csslintrc
file.
@XhmikosR , @eriwen , @tomasz-oponowicz , @nschonni , please, update wiki page, that old .csslintrc
format don't work now.
Thanks.
I've installed
csslint
vianpm
.In my
.csslintrc
, (here's a sample)I get this error
When I
console.log(globalOptions)
, I only seeWhich is, in fact, missing
adjoining-classes
and every other option found in the sample.csslintrc
.Am I missing something an install step somewhere?