Skip to content

Instantly share code, notes, and snippets.

@sgnl
Last active May 4, 2016 07:33
Show Gist options
  • Save sgnl/04fa7063183e7777e079 to your computer and use it in GitHub Desktop.
Save sgnl/04fa7063183e7777e079 to your computer and use it in GitHub Desktop.
Adding the SublimeLinter and JSHint packages to your sublime text 3.
  1. Install/Verify you have Sublime Text 3 (http://sublimetext.com/3)

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

    1. Type PC Install to make use of FuzzySearch to bring up Package Control: Install Package
    2. Hit the enter key
    3. Wait the repositories to load (look at the status bar at the bottom) give it a few seconds.
    4. Type SublimeLinter and hit enter to install it
  • 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 with sudo only after it errors out and says it needs to)
  • 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
  • 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 hit enter

  • type broken code

    • e.g. function ({var;;};
  • Lint! Yay

  • No Lint? Follow the Documentation that opened up when you first installed SublimeLinter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment