ESLint
ESLint any JavaScript file in Sublime Text
Details
Installs
- Total 155K
- Win 60K
- Mac 66K
- Linux 29K
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 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 3 | 5 | 8 | 5 | 3 | 3 | 4 | 3 | 4 | 6 | 4 | 5 | 1 | 1 | 5 | 5 | 4 | 4 | 3 | 5 | 1 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 2 | 1 | 9 | 0 | 3 | 5 | 5 | 3 | 4 | 0 | 0 | 3 | 3 | 4 | 2 | 1 | 6 | 6 |
Mac | 1 | 1 | 0 | 3 | 6 | 2 | 0 | 0 | 1 | 4 | 2 | 4 | 2 | 2 | 5 | 2 | 0 | 4 | 6 | 5 | 2 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 7 | 6 | 2 | 1 | 1 | 1 | 2 | 2 | 3 | 0 | 0 | 3 | 6 | 5 | 1 | 4 | 1 | 1 |
Linux | 1 | 1 | 2 | 3 | 4 | 2 | 1 | 1 | 0 | 8 | 6 | 1 | 1 | 0 | 0 | 1 | 1 | 2 | 3 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 2 | 1 | 3 | 3 | 4 | 1 | 2 | 2 | 0 | 0 | 3 | 1 | 3 | 0 | 1 | 0 | 4 |
Readme
- Source
- raw.githubusercontent.com
ESLint for Sublime Text
Lint ECMAScript/JavaScript syntax by ESLint in Sublime Text 2 and 3.
Prerequisites
Installation
Install Node.js and eslint
Before using this plugin, you must ensure that eslint
is installed on your system.
To install eslint
, do the following:
npm install -g eslint
Install plugin
Install this plugin by using Sublime Text Package Control.
- Open “Command Pallet” Ctrl + Shift + p (Cmd + Shift + p on OSX)
- Select “Package Control: Install Package”
- Select ESLint
Run ESLint
ESLint an active JavaScript file.
Open the context menu (right-click), and Select ESLint,
Or Open “Command Pallet” and Select ESLint,
Or keyboard shortcut: Ctrl + Alt + e (Cmd + Option + e on OSX)F4 : Jump to next error row/column
Shift + F4 : Jump to previous error row-column
Note:
The Ctrl + Alt + e (Cmd + Option + e on OSX) shortcut changes the Build System on the current file to ESLint,
then Builds to run ESLint on the file and output any errors for jumping to within the file.
You could alternatively set the Build System to Automatic and Ctrl + b (Cmd + b on OSX) or F7,
but only on files that end with .js
.
Configuring ESLint
ESLint allows you to specify the JavaScript language options you want to support by using .eslintrc
file,
it will use the first .eslintrc
file found traversing from the active file in Sublime Text up to your project's root.
You can configure ESLint options by specify .eslintrc
file.
For more information, see the ESLint docs.
Settings
Several settings are available to customize the plugin's behavior. Those settings are stored in a configuration file, as JSON.
Go to “Preferences
/ Package Settings
/ ESLint
/ Settings - User
” to add your custom settings.
node_path
Default: ""
The directory location of your node
executable lives.
If this is not specified, then it is expected to be on Sublime's environment path.
node_modules_path
Default: ""
The directory location of global node_modules
via npm
.
If this is not specified, then it is expected to be on system environment variable NODE_PATH
.
config_file
Default: ""
This option allows you to specify an additional configuration file for ESLint.
If not specified, follows the default config file hierarchy.
This option works same as ESLint -c
or --config
command line option.
For more information, see the ESLint docs.
Example:
{
"node_path": "/usr/local/bin",
"node_modules_path": "/usr/local/lib/node_modules",
"config_file": "/path/to/.eslintrc.js"
}
ESLint on save
Install SublimeOnSaveBuild