brackets-jshint icon indicating copy to clipboard operation
brackets-jshint copied to clipboard

Support .jshintignore

Open peterflynn opened this issue 10 years ago • 3 comments
trafficstars

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 avatar Feb 07 '15 00:02 peterflynn

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

peterflynn avatar Feb 07 '15 00:02 peterflynn

@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.

MiguelCastillo avatar Feb 07 '15 01:02 MiguelCastillo

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. :)

cfjedimaster avatar Feb 08 '15 20:02 cfjedimaster