-
Install/Verify you have Sublime Text 3 (http://sublimetext.com/3)
-
Install/Verify that Package Control Module is installed to for Sublime Text: https://packagecontrol.io/installation
Linux: Click the Preferences > Browse Packages… menu Browse up a folder and then into the Installed Packages/ folder Download Package Control.sublime-package and copy it into the Installed Packages/ directory Restart Sublime Text
-
Open up Package Control in your sublime text. (cmd+shift+P)
- Type
PC Install
to make use of FuzzySearch to bring upPackage Control: Install Package
- Hit the
enter
key - Wait the repositories to load (look at the status bar at the bottom) give it a few seconds.
- Type
SublimeLinter
and hit enter to install it
- Type
-
Repeat the step above but this time look for the package named
Sublimelinter-jshint
-
Documentation file will appear in your sublime text, keep this file open and refer to it if you have any problems!
-
In Terminal install the jshint npm module globally.
- e.g.
npm install -g jshint
(only run it withsudo
only after it errors out and says it needs to)
- e.g.
-
right-click on the document
- Navigate to 'Sublimelinter > Lint Mode > enable the
Background
setting - Navigate to 'Sublimelinter > Mark Style > enable the
Outline
setting - Navigate to 'Sublimelinter > Choose Gutter Theme..." and select
Blueberry - Round
from the list
- Navigate to 'Sublimelinter > Lint Mode > enable the
-
Quit Sublime Test (cmd+Q or alt+f4)
-
Open sublime text
-
Create a new file in Sublime Text with
cmd+n
-
Change the Syntax to recognize Javascript,
cmd+shift+p
-
type
ss javas
(fuzzy search for 'Set Syntax: Javascript) then hitenter
-
type broken code
- e.g.
function ({var;;};
- e.g.
-
Lint! Yay
-
No Lint? Follow the Documentation that opened up when you first installed SublimeLinter.