Open njx opened 9 years ago
:+1:
Based on the API of brackets, when you registers a new linting tool, it should suppress the built-in one: " unregisters the built-in Brackets JSLint provider."
http://brackets.io/docs/current/modules/language/CodeInspection.html
The plugin does not call this or it does not work properly?
It does not suppress the default provider (JSLint
). You have to do it manually. I will update the documentation in the code.
@njx thanks for this. I was wondering how to turn JSLint off. :beer:
:+1:
@njx would this be a bug for Brackets: Open file.js. I see JSLint and JSHint results in the panel. I click the caret to close JSLint results. I select another file. I go back to file.js and the JSLint stuff is expanded again.
I added a note to the readme.
This doesn't seem to work on Windows, still getting both JSLint and JSHint warnings.
Update: Never mind, it works. I just needed to wrap it in another set of braces:
{
"language": {
"javascript": {
"linting.prefer": "JSHint",
"linting.usePreferredOnly": true
}
}
}
@njx's code can be pasted in the preference file. You can open it from within Brackets under the Debug menu.
@cfjedimaster: yes, we should remember the state - definitely worth filing.
Before Brackets 1.1, I think the JSHint extension automatically suppressed JSLint errors. In 1.1, with the new multiple linter support, JSLint errors started showing up again. It might be good to put a note in your README about adding the proper preference to
.brackets.json
to re-suppress the JSLint errors:Or maybe there's a way you could set that preference programmatically by default (though you'd have to make sure that the user's own
.brackets.json
would properly override that).