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
  • 9 months ago
  • 40 minutes ago
  • 5 years ago

Installs

  • Total 197K
  • Win 95K
  • OS X 69K
  • Linux 33K
Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10
Windows 56 45 45 77 81 92 86 84 43 44 69 84 79 81 93 63 68 93 102 89 95 91 40 49 70 90 99 105 76 57 60 107 102 91 108 132 59 55 108 99 97 108 88 46 63 105
OS X 17 15 11 31 34 46 32 43 18 18 22 34 32 32 38 19 20 27 55 43 38 36 22 19 39 42 40 41 38 21 27 39 41 40 50 36 26 21 33 41 42 64 41 22 21 53
Linux 12 9 14 17 24 33 16 19 15 19 15 16 23 28 28 12 16 21 18 18 22 21 6 13 24 18 19 26 21 10 15 24 26 21 20 23 16 10 28 29 19 27 16 15 7 30

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