cfjedimaster / brackets-jshint

Adds JSHint support to Brackets
MIT License
130 stars 41 forks source link

Support .jshintignore #74

Open peterflynn opened 9 years ago

peterflynn commented 9 years ago

In addition to .jshintrc, there's a .jshintignore file that can be used to exclude files or folders. It would be nice if this extension also ignored those files and didn't pop up the errors panel when you open one. Especially useful if you're pairing it with a bulk-linting extension like my Lint All the Things.

There are basically no official docs on the file format that I could find. This forum post is the closest thing: https://groups.google.com/d/msg/jshint/62N12QUhBCs/v9a1XC7I_j8J. So it looks like just a list of standard globs (Brackets includes a globmatch library that you can probably use for this).

peterflynn commented 9 years ago

Also btw maybe an opportunity for collaboration with @MiguelCastillo since his extension is also missing this functionality so far: MiguelCastillo/Brackets-InteractiveLinter#27 :-)

MiguelCastillo commented 9 years ago

@peterflynn Yes sir, someone logged it on my side https://github.com/MiguelCastillo/Brackets-InteractiveLinter/issues/96. I had looked into it a while ago but didn't find any docs on it. But yeah, it does look like a list of globs compatible with .npmignore and .gitignore. Thanks for the hint.

I did a quick npm search and found this. I will give it a try, but if that does not work as expected I think we can write a reusable module like that we can all use.

cfjedimaster commented 9 years ago

I was going to say - why bother with this - just don't worry about the linting for files you don't care about - but then I remembered how it will pop up automatically. @MiguelCastillo - you mind posting back here if you get yours working? (That way I can steal from yours. :)