How to add SublimeLinter and JSHint to Sublime Text
In this short video you will learn how to add SublimeLinter and JSHint to the extremely popular Sublime Text editor.
Setting up JSHint in Sublime Text is simple but does require a few steps.
1. Installing Sublime Text Package Manager
Chances are if you have been using Sublime Text for any amount of time you are already familiar with the Package Manager. If not head on over to packagecontrol.io and follow the simple instructions for installing it in your particular version of Sublime Text.
2. Installing SublimeLinter 3
To install this package in Sublime Text use the shortcut
Command+Shift+P to open the “Command Palette” and type in
Package Control:Install Package. Next type in
SublimeLinter and click to install.
3. Installing SublimeLinter-jshint
Now that the framework is installed you will need to install the specific linter you are interested in. In this example we will be using JSHint. Again open the Command Palette and install the package
4. Installing Node.js and SublimeLinter-jshint
SublimeLinter-jshint requires Node.js. Installing Node is extremely easy, just head over to nodejs.org/download/ and download the pre-built installer for your OS.
Once that is done your last step is to fire up your trusty terminal and enter:
npm install -g jshint
// sudo npm install -g jshint (if you have permission issues)
That’s it! You are now free to be harassed by your linter of choice.