This is a fix for adobe/brackets#2270 and follow-up pull request of adobe/brackets#2100
Adding tooltip to JSLint start on start-up with JSLint disabled
It might be cleaner to just call run() so the code there that chooses the tooltip, icon color, etc. isn't duplicated here (which raises the possibility of future bugs similar to this one).
But actually, it looks like the initial _setEnabled() call from _prefs will always force a run() already. I think the problem is, because it happens before htmlReady, the UI isn't there to be updated yet. Do you want to try moving the _setEnabled() call into the htmlReady callback and see if that fixes it? (And do some testing to make sure it doesn't have any negative side effects).
If that works I think it's the cleanest fix. We should add a comment onto the _setEnabled() call saying it triggers the initial UI update, and then that's that.
Moving _setEnabled to HTML ready
That did fixed this and the previews JSLint bug. I did several testing and it seem to be working fine in all the cases.
Thanks, looks nice & clean. Seems to work find on my end too. Merging.