ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

JSHint

by uipoet ST2/ST3 Top 100

JSHint any JavaScript file in Sublime Text 2

Details

  • 2016.07.26.21.31.12
  • github.​com
  • github.​com
  • 1 year ago
  • 1 hour ago
  • 6 years ago

Installs

  • Total 218K
  • Win 108K
  • OS X 74K
  • Linux 36K
Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8
Windows 16 35 33 46 62 65 58 29 36 32 46 51 60 74 50 33 31 50 45 57 48 11 27 27 47 40 50 56 39 38 32 32 46 49 46 47 23 41 55 51 54 63 49 37 32 43
OS X 7 18 5 22 22 29 11 15 12 11 19 21 24 20 28 7 7 13 16 19 22 6 3 13 14 15 14 20 8 8 10 16 18 20 16 11 15 11 19 16 22 16 30 13 13 22
Linux 0 5 8 12 8 9 15 12 5 9 15 18 11 12 16 11 6 15 8 18 16 2 9 7 9 19 9 10 7 4 9 7 10 11 12 10 7 3 7 18 11 10 12 7 4 11

Readme

Source
raw.​githubusercontent.​com

JSHint for Sublime Text

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

ScreenShot

Prerequisites: jshint and Sublime Package Control

Mac OS X: Installing node with homebrew or macports is assumed. The path to jshint is hardcoded in this plugin as /usr/local/share/npm/bin:/usr/local/bin:/opt/local/bin. There is no reliable way to get the path from your environment.

Linux: Make sure jshint is in your environment path.

Windows: Installing node with the Windows Installer from nodejs.org 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