How to use JSHint in Sublime Text on Windows machine

Since this is in the “quick tips” category I won’t go into what Sublime Text is, or why using JSHint is recommended, and that for it’s installation you need Node.js, I will just state the shortest possible path in how to install it, as I had some problems in doing this in a timely fashion:

//install jshint via npm
npm install jshint -g

In Sublime Text install JSHint Gutter via package manager.

And now, finally, since I’m on a windows machine, the problem was that once I got all this installed I had to set the Node.js path in JSHint Gutter plugin but with setting the absolute path to node.exe by using forward slashes:

{
  // Simply using `node` without specifying a path sometimes doesn't work :(
  // https://github.com/victorporof/Sublime-JSHint#oh-noez-command-not-found
  // http://nodejs.org/#download
  "node_path": "C:/Program Files/nodejs/",

  // Automatically lint on edit (Sublime Text 3 only).
  "lint_on_edit": false,

  // Automatically lint when a file is saved.
  "lint_on_save": true,

  // Highlight problematic regions when selected.
  "highlight_selected_regions": false
}
Written by Nikola Brežnjak