cfjedimaster / brackets-jshint

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

Add note to README about suppressing JSLint in Brackets 1.1 #68

Open njx opened 9 years ago

njx commented 9 years ago

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:

    "language": {
        "javascript": {
            "linting.prefer": "JSHint",
            "linting.usePreferredOnly": true
        }
    }

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

fpirsch commented 9 years ago

:+1:

imrefazekas commented 9 years ago

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?

busykai commented 9 years ago

It does not suppress the default provider (JSLint). You have to do it manually. I will update the documentation in the code.

driskull commented 9 years ago

@njx thanks for this. I was wondering how to turn JSLint off. :beer:

tshak commented 9 years ago

:+1:

cfjedimaster commented 9 years ago

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

cfjedimaster commented 9 years ago

I added a note to the readme.

blah238 commented 9 years ago

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
    }
  }
}
fpirsch commented 9 years ago

@njx's code can be pasted in the preference file. You can open it from within Brackets under the Debug menu.

njx commented 9 years ago

@cfjedimaster: yes, we should remember the state - definitely worth filing.

cfjedimaster commented 9 years ago

Done - https://github.com/adobe/brackets/issues/10316