Skip to content
JSHint any JavaScript file in Sublime Text 2
Branch: master
Clone or download
uipoet Merge pull request #76 from hyperknot/master
remove OS X hard-coding, support SublimeFixMacPath
Latest commit 444dda8 Feb 11, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Usability Improvements Feb 19, 2012
.jshintrc Update .jshintrc for new JShint syntax's Jul 26, 2016
.no-sublime-package Add a `.no-sublime-package` file Jan 13, 2014
Base File.sublime-settings make jshint binary configurable Aug 19, 2014
Default (Linux).sublime-keymap
Default (OSX).sublime-keymap Add OS-specific keybindings to avoid clobbering ctrl+J on Win/Linux Apr 20, 2013
Default (Windows).sublime-keymap
Default.sublime-commands Usability Improvements Feb 19, 2012
Main.sublime-menu revert package paths Aug 19, 2014 remove OS X hard-coding, support SublimeFixMacPath Oct 11, 2015
reporter.js Merge pull request #74 from jnu/config-binary Feb 11, 2018

#JSHint for Sublime Text

The best JavaScript syntax checker: JSHint for the best text editor: Sublime Text


Prerequisites: jshint and Sublime Package Control

Mac OS X: Installing node with homebrew or macports is assumed. Use SublimeFixMacPath for setting the correct OS X path. Supports nvm - Node Version Manager

Linux: Make sure jshint is in your environment path.

Windows: Installing node with the Windows Installer from is assumed.

##1. Terminal

npm install -g jshint

Note: JSHint will use the first .jshintrc file found traversing from the active file in Sublime Text up to your project's root.

##2. Sublime Text Package Control

  • command-shift-p or control-shift-p in Linux/Windows
  • type install p, select Package Control: Install Package
  • type jshint, select JSHint

Note: Without Sublime Package Control, you could manually clone to Packages directory as 'JSHint', exactly.

##3. JSHint an active JavaScript file

  • control-j or alt-j in Linux/Windows or Tools/Contextual menus or the Command Palette
  • F4 jump to next error row/column
  • shift-F4 jump to previous error row-column

Note: The control-j/alt-j shortcut changes the Build System on the current file to JSHint, then Builds to run JSHint on the file and output any errors for jumping to within the file. You could alternatively set the Build System to Automatic and command-b/control-b/F7, but only on files that end with .js.

##JSHint on save

Install SublimeOnSaveBuild

You can’t perform that action at this time.