JSLint
JSLint for Sublime Text 2 and 3.
Labels linting
Details
Installs
- Total 215K
- Win 110K
- Mac 69K
- Linux 35K
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 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 2 | 1 | 2 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 | 1 | 2 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Linux | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime-JSLint
Easy JSLint for Sublime Text.
- It has JSLint built in; requires only Node.JS installed on your system.
- It can automatically run JSLint when you save a
.js
file. - Support for ES6: The Good Parts.
- Now supports JSON.
- Fully configurable linting options.
- Jump to errors using F4 / Shift+F4.
- Works on Linux, MacOS and Windows.
Prerequisites
NodeJS must be installed on your system and you must be able to run 'node' from the command line. Alternatively, if you have a different jslint
utility already installed on your system, you may update the settings to use it instead.
Installation
Using Package Control:
- Install the Package Control plugin if you don't have it
- Press Ctrl+Shift+P to bring up the Command Palette (or use Tools > Command Palette menu)
- Select Package Control: Install Package
- Type 'JSLint' to find JSLint (with node) for Sublime Text 2
- Select 'JSLint (with node) for Sublime Text 2' to install
Not using Package Control:
- Get files from the package archive
- unzip to Packages/JSLint directory (use “2” or “3” depending on which version you have):
- Linux: ~/.config/sublime-text-2/Packages/JSLint
- Mac: ~/Library/Application Support/Sublime Text 2/Packages/JSLint
- Windows: %APPDATA%/Sublime Text 2/Packages/JSLint
- Relaunch Sublime Text
Usage
Any of the following will work:
- Bring up the Command Palette (
Command+Shift+P
on OS X,Control+Shift+P
on Linux/Windows), then typeJSLint
. - Click the Tools > JSLint menu entry.
- Press
CTRL+L
. - Just save a
.js
file.
Settings
- Navigate to Preferences > Package Settings > JSLint > Settings - Default.
- To preserve custom settings:
- copy default settings to Preferences > Package Settings > JSLint > Settings - User
- modify them to your requirements
Troubleshooting
“No such file or directory” when saving
When, on saving a .js file, you get this:
[Errno 2] No such file or directory
[cmd: [u'node', ...]]
the command to run node might not be in your path.
Mac OS X users, ensure that /usr/local/bin
is in your $PATH
environment variable.
Linux users, if your node command is 'nodejs', as is the case when installing from some Linux repos,
navigate to Preferences > Package Settings > JSLint > Settings - User to change it, e.g.
{
"jslint": ["nodejs", "~/.config/sublime-text-2/Packages/JSLint/linter.js"]
}