Brackets Editor - Disable jslint and use jshint instead

Alright, I finally got my hands on Adobe's new open source editor, namely Bracket and it is making me question how much I really like Sublime Text 3. I won't get into its merits just yet as I am still evaluating it. However, what really annoyed the living daylights out of me was its use of jslint which is archaic to say the least, especially when you are doing node.js stuff. It will throw you errors/warnings that quite frankly, do not apply to ECMA Script 5.

However, after some jiggery pokery to find a way to disable jslint and use the more modern jshint system in brackets, I found out you can do it by doing the following:

  1. Click on "Debug" in on your toolbar.
  2. In the dropdown, click on "Open Preferences File".

This will give you a JSON file which has some settings there already that should look akin to this:

{
  "me.drewh.jsbeautify.on_save": false,
  "linting.collapsed": false,
}

Mine has some plugins so there are some stuff there already. However that is irrelevant, all you need is just to add the following into the JSON file:

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

The end result, at least in my case should look like this:

{
    "me.drewh.jsbeautify.on_save": false,
    "linting.collapsed": false,
    "language": {
        "javascript": {
        "linting.prefer": ["JSHint"],
        "linting.usePreferredOnly": true
        }
    }
  }

This would disable jslint and only use jshint. This would prevent a lot of stupid archaic warning messages that mean nothing today.

Hope this helped you have a more positive experience with Adobe Brackets :)