cfjedimaster / brackets-csslint

CSSLint extension for Brackets
61 stars 13 forks source link

Adding support for .csslintrc files (https://github.com/cfjedimaster/bra... #22

Closed EvHaus closed 10 years ago

EvHaus commented 10 years ago

https://github.com/cfjedimaster/brackets-csslint/issues/21

cfjedimaster commented 10 years ago

Could you share with me an example csslint file I could use to test this? Along with a CSS file to use as a target. Yes I'm being lazy - but it would help me confirm.

EvHaus commented 10 years ago

Try this. Create a .csslintrc file in your project root:

{
    "box-model": true
}

Then create a CSS file:

.test {
    height: 30px;
    padding: 30px;
}

It should display an error. Then change "box-model" value to "false" in .csslintrc, and the error in the CSS file should go away.

cfjedimaster commented 10 years ago

So, this works, but I noticed something that may or may not be a bug. I had folder x open. I made a new folder called csslint and put test.css in there. I then added a .csslintrc file and it was not picked up. I did some debugging and saw that the extension was trying to find it in x, ie, the root folder of the project. I'm wondering if that makes sense. Ie, should it check project root or current folder. Anyway, publishing for now.

EvHaus commented 10 years ago

Yes, ideally, it should work that way. It should walk up the directories from the current file and use the first found .csslintrc file. In fact, I asked for something similar here: https://github.com/cfjedimaster/brackets-jshint/issues/20

However -- my Brackets-fu is not good enough to figure that one out without help. I just copied your code from brackets-jshint for now.

cfjedimaster commented 10 years ago

I think we're good for now (in other words, I'm too lazy to worry about it :)

On Sun, Jan 26, 2014 at 12:04 PM, Globex Designs, Inc < notifications@github.com> wrote:

Yes, ideally, it should work that way. It should walk up the directories from the current file and use the first found .csslintrc file. In fact, I asked for something similar here: cfjedimaster/brackets-jshint#20https://github.com/cfjedimaster/brackets-jshint/issues/20

However -- my Brackets-fu is not good enough to figure that one out without help. I just copied your code from brackets-jshint for now.

— Reply to this email directly or view it on GitHubhttps://github.com/cfjedimaster/brackets-csslint/pull/22#issuecomment-33324946 .

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster