-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Overriding JS linting doesn't work on startup #5442
Comments
I'm now seeing this with CSSLinter as well. If a CSS file is the active doc on startup, it will show that it has no linter until I edit the file. |
It works fine for me, but I suspect the problem here is a race condition: ExtensionLoader loads core extensions in parallel with user-installed/dev extensions. We still start loading the core extensions first, so normally they're likely to finish sooner too... but there's no guarantee. Which means in some cases it's possible for the core JSLint extension to load after a user-installed extension that wants to override it. Workaround -- You can work around this by waiting for But ideally you could just be guaranteed that default extensions all load first. It would have other benefits like more consistent menu ordering as well. I'll work on this. |
I am currently using AppInit.appReady() though. For both jsHint and my CSS Linter. Oh, you meant use that and triggering a re-lint. So are you seriously saying to just do this:
|
@cfjedimaster Yes, as a workaround until this bug is fixed. But in the case of CSS Linter you don't have any reason to wait until appReady since that itself is a workaround for (reliably) overriding the default JSLint extension. So for CSS you can just call |
Actually correction, call |
I can confirm this mod works for CSSLint. Testing JSHint now. |
Ditto for JSHint. Releasing an update for em now. Thank you. |
…ons. This makes menu ordering more consistent, and fixes bug #5442 where the order of registration matters. Also change extension loading to work with arrays most of the time, avoiding bugs if there are ","s in pathnames. And fix stale comment in ExtensionManager.
@cfjedimaster I have a branch where loading order is more predictable. Would you mind checking on |
I just tested with JSHint and it seems to be working as you said (removed On Wed, Oct 9, 2013 at 7:03 PM, Peter Flynn [email protected]:
Raymond Camden, Adobe Developer Evangelist Email : [email protected] |
@cfjedimaster Glad to hear it! The fix has landed in master now, so closing. |
My JSHint extension (about to be checked in with an update in the next five minutes) makes use of the new Linting API. If Brackets launches with a JS file as the default open document, the linting will be done with JSLint. If I edit the file, it will switch to JSHint and stay that way for the rest of the editing session.
The text was updated successfully, but these errors were encountered: