Closed tylergoza closed 9 years ago
Can you share the csslintrc you tried?
Sorry I would have gotten back earlier but got swamped. My first attempt was:
--ignore=box-model,order-alphabetical
The second attempt was:
{
"ignore": ["box-model", "order-alphabetical"]
}
And my final attempt was:
{
"box-model": false,
"order-alphabetical": false
}
If you could just show an example of how this should look that would be awesome. (I assume that none of these are exactly correct).
Thanks! (and the quick response was really appreciated)
A bit of additional information is that it works if I use the inline options at the top of the file. So this works:
/*csslint box-model:false, order-alphabetical:false */
Hey - sorry this got lost. I'm at the CSSLint site (http://csslint.net/) and I expanded the rules but do not see one for alpha sort.
They could have removed it. I've been using the inline comment at the top of the files and haven't received any errors related. The main thing I'm looking for is the correct layout of the .csslintrc... I gave some examples for what I tried and really just need to know what should work. Should it be formatted like cli args (--ignore=<comma separated list
), json object with key:list ({'ignore': ['<val1>', '<val2>']}
) or json object ({'<setting>':'ignore'...}
).
I'm at a conference and might be a bit slow to respond, if so I apologize and will attempt to get back to you as soon as possible.
So this came up in another issue, and it DOES work, see https://github.com/cfjedimaster/brackets-csslint/issues/41
So it doesn't use a .csslintrc? It uses a setting in brackets.json....these are not the same. A .blahrc file will be a file named .csslintrc that is set per project or even per folder in a project like .jshintrc (thing .bashrc or .vimrc). Is brackets.json per project or a single cross-project file? Sorry, here is why I asked the question. This is in the Readme: "CSSLint also supports .csslintrc files. See this for more information: https://github.com/CSSLint/csslint/issues/359"
It is supposed to support multiple levels.
The Brackets preference is a DEFAULT. The .csslintrc file is a project default. And finally, you can use /* comments */ on top for a per file setting.
If you don't see that, then .csslintrc may be broken.
On Fri, May 29, 2015 at 12:58 PM, Tyler Goza notifications@github.com wrote:
So it doesn't use a .csslintrc? It uses a setting in brackets.json....these are not the same. A .blahrc file will be a file named .csslintrc that is set per project or even per folder in a project like .jshintrc (thing .bashrc or .vimrc). Is brackets.json per project or a single cross-project file?
— Reply to this email directly or view it on GitHub https://github.com/cfjedimaster/brackets-csslint/issues/37#issuecomment-106889482 .
Raymond Camden, Developer Advocate for MobileFirst at IBM
Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden
Gotcha so this is most likely an issue with csslint not brackets-csslint. Thank you. Can you verify a working .csslintrc file on your side? If not a bug may need to be filed with the csslint maintainers.
Ok, it works for me, use this format:
{
"order-alphabetical": false
}
Perfect. Thanks!! Might need to add an example of .csslintrc to your Readme. The last time I looked at the csslint discussion they didn't have any example of what works but a discussion about how they might implement it. Just a simple example would be fine. Something to the effect :
A .csslintrc file should look something like this:
{
"rule": <boolean>
}
ex:
{
"order-alphabetical": false,
"box-model": true
}
Thanks so much!
agreed.
On Fri, May 29, 2015 at 1:33 PM, Tyler Goza notifications@github.com wrote:
Perfect. Thanks!! Might need to add an example of .csslintrc to your Readme. The last time I looked at the csslint discussion they didn't have any example of what works but a discussion about how they might implement it. Just a simple example would be fine. Something to the effect :
A .csslintrc file should look something like this:
{ "rule":
} ex: { "order-alphabetical": false, "box-model": true } — Reply to this email directly or view it on GitHub https://github.com/cfjedimaster/brackets-csslint/issues/37#issuecomment-106898463 .
Raymond Camden, Developer Advocate for MobileFirst at IBM
Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden
I have tried to use .csslintrc by putting the file in the same folder with my css files. It doesn't seem to be working. I followed the link you have in your Readme but that discussion doesn't seem to explain which format they settled on. thus far I have tried the cli options in the file and json with ignore and individual overrides and I am still getting the same errors thrown, (mostly interested in the order-alphabetical). Can you put an example of exactly what the .csslintrc should contain?