cfjedimaster / brackets-jshint

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

Consider using Brackets linting API #14

Closed peterflynn closed 10 years ago

peterflynn commented 11 years ago

Brackets Sprint 31 will introduce a new, clean API for linting providers: https://github.com/adobe/brackets/wiki/Release-Notes:-Sprint-31#newimproved-extensibility-apis

Using the new API could potentially improve the UI of this extension -- and allow it to benefit from future linting functionality upgrades automatically.

jlafitte commented 11 years ago

I would like to see this as well. The built in JSLint support in S31 can't easily be disabled. I can probably figure out a way to do it, but it would be nice to just have JSHint replace it in the new linting support.

cfjedimaster commented 11 years ago

John, I did this tonight for my CSSLint ext and it was incredibly easy to do once I figured it out. So I'll hit this extension (and the W3C one) tomorrow.

On Mon, Sep 23, 2013 at 8:30 PM, John Lafitte notifications@github.comwrote:

I would like to see this as well. The built in JSLint support in S31 can't easily be disabled. I can probably figure out a way to do it, but it would be nice to just have JSHint replace it in the new linting support.

— Reply to this email directly or view it on GitHubhttps://github.com/cfjedimaster/brackets-jshint/issues/14#issuecomment-24968951 .

Raymond Camden, Adobe Developer Evangelist

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

peterflynn commented 11 years ago

@jlafitte In the meantime, you can disable the built-in JSLint by unchecking View > Lint Files on Save (similar to earlier sprints, just different name in the menu). But I agree, using the standard API would be great!

(Btw @cfjedimaster, when your extension registers for the JS language it should automatically disable/replace the built-in JSLint linter... so no worries about collisions there).

jlafitte commented 11 years ago

@peterflynn right, but then to use the newly updated csslint I'd have to re-enable it.

peterflynn commented 11 years ago

True, good point. Will definitely be easier once they're all ported over.

cfjedimaster commented 10 years ago

Peter, I'm updating my extension and am NOT seeing it take over jslint.

cfjedimaster commented 10 years ago

Hmm. It seems to be working now - but only after I modded the JS file. It seems like - maybe - on first open if a JS file is there, JSLint is used. (Not confirmed.)

cfjedimaster commented 10 years ago

I can confirm that now. Wouldn't that be a Brackets bug?

cfjedimaster commented 10 years ago

Ok, another problem. In my jshint code, I check the project folder for a project specific jshintrc. This is done via an async file call. I cache the reads so I don't have to do it again, but on the first call it fails because my main linting function returned null when the async call happened. Check out this gist:

https://gist.github.com/cfjedimaster/6843531

is there anyway around this for the linting API? I've got another linter (the w3c validator) that requires a HTTP call and would suffer the same problem.