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

ESLint

by polygonplanet ALL

ESLint any JavaScript file in Sublime Text

Details

Installs

  • Total 156K
  • Win 60K
  • Mac 66K
  • Linux 30K
May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 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
Windows 1 4 4 6 5 1 3 4 6 6 2 3 0 3 2 2 6 5 4 4 2 2 5 3 4 4 2 2 4 6 4 4 8 4 4 4 3 6 7 4 3 2 5 6 2 2
Mac 0 5 1 4 5 1 1 2 2 1 4 1 1 1 4 4 1 6 1 2 4 3 5 2 3 3 1 0 1 2 4 3 7 1 1 0 3 5 5 4 1 4 5 4 1 2
Linux 2 2 2 2 3 3 1 2 4 3 2 0 0 0 2 0 1 3 5 0 0 4 2 3 1 5 2 1 1 2 2 1 0 2 1 2 1 1 2 1 0 2 1 2 1 4
051015May 16May 13May 10May 7May 4May 1Apr 28Apr 25Apr 22Apr 19Apr 16Apr 13Apr 10Apr 7Apr 4Apr 1May 16 Linux: 2 Mac: 0 Windows: 1May 15 Linux: 2 Mac: 5 Windows: 4May 14 Linux: 2 Mac: 1 Windows: 4May 13 Linux: 2 Mac: 4 Windows: 6May 12 Linux: 3 Mac: 5 Windows: 5May 11 Linux: 3 Mac: 1 Windows: 1May 10 Linux: 1 Mac: 1 Windows: 3May 9 Linux: 2 Mac: 2 Windows: 4May 8 Linux: 4 Mac: 2 Windows: 6May 7 Linux: 3 Mac: 1 Windows: 6May 6 Linux: 2 Mac: 4 Windows: 2May 5 Linux: 0 Mac: 1 Windows: 3May 4 Linux: 0 Mac: 1 Windows: 0May 3 Linux: 0 Mac: 1 Windows: 3May 2 Linux: 2 Mac: 4 Windows: 2May 1 Linux: 0 Mac: 4 Windows: 2Apr 30 Linux: 1 Mac: 1 Windows: 6Apr 29 Linux: 3 Mac: 6 Windows: 5Apr 28 Linux: 5 Mac: 1 Windows: 4Apr 27 Linux: 0 Mac: 2 Windows: 4Apr 26 Linux: 0 Mac: 4 Windows: 2Apr 25 Linux: 4 Mac: 3 Windows: 2Apr 24 Linux: 2 Mac: 5 Windows: 5Apr 23 Linux: 3 Mac: 2 Windows: 3Apr 22 Linux: 1 Mac: 3 Windows: 4Apr 21 Linux: 5 Mac: 3 Windows: 4Apr 20 Linux: 2 Mac: 1 Windows: 2Apr 19 Linux: 1 Mac: 0 Windows: 2Apr 18 Linux: 1 Mac: 1 Windows: 4Apr 17 Linux: 2 Mac: 2 Windows: 6Apr 16 Linux: 2 Mac: 4 Windows: 4Apr 15 Linux: 1 Mac: 3 Windows: 4Apr 14 Linux: 0 Mac: 7 Windows: 8Apr 13 Linux: 2 Mac: 1 Windows: 4Apr 12 Linux: 1 Mac: 1 Windows: 4Apr 11 Linux: 2 Mac: 0 Windows: 4Apr 10 Linux: 1 Mac: 3 Windows: 3Apr 9 Linux: 1 Mac: 5 Windows: 6Apr 8 Linux: 2 Mac: 5 Windows: 7Apr 7 Linux: 1 Mac: 4 Windows: 4Apr 6 Linux: 0 Mac: 1 Windows: 3Apr 5 Linux: 2 Mac: 4 Windows: 2Apr 4 Linux: 1 Mac: 5 Windows: 5Apr 3 Linux: 2 Mac: 4 Windows: 6Apr 2 Linux: 1 Mac: 1 Windows: 2Apr 1 Linux: 4 Mac: 2 Windows: 2May 16 Linux: 2 Mac: 0 Windows: 1May 15 Linux: 2 Mac: 5 Windows: 4May 14 Linux: 2 Mac: 1 Windows: 4May 13 Linux: 2 Mac: 4 Windows: 6May 12 Linux: 3 Mac: 5 Windows: 5May 11 Linux: 3 Mac: 1 Windows: 1May 10 Linux: 1 Mac: 1 Windows: 3May 9 Linux: 2 Mac: 2 Windows: 4May 8 Linux: 4 Mac: 2 Windows: 6May 7 Linux: 3 Mac: 1 Windows: 6May 6 Linux: 2 Mac: 4 Windows: 2May 5 Linux: 0 Mac: 1 Windows: 3May 4 Linux: 0 Mac: 1 Windows: 0May 3 Linux: 0 Mac: 1 Windows: 3May 2 Linux: 2 Mac: 4 Windows: 2May 1 Linux: 0 Mac: 4 Windows: 2Apr 30 Linux: 1 Mac: 1 Windows: 6Apr 29 Linux: 3 Mac: 6 Windows: 5Apr 28 Linux: 5 Mac: 1 Windows: 4Apr 27 Linux: 0 Mac: 2 Windows: 4Apr 26 Linux: 0 Mac: 4 Windows: 2Apr 25 Linux: 4 Mac: 3 Windows: 2Apr 24 Linux: 2 Mac: 5 Windows: 5Apr 23 Linux: 3 Mac: 2 Windows: 3Apr 22 Linux: 1 Mac: 3 Windows: 4Apr 21 Linux: 5 Mac: 3 Windows: 4Apr 20 Linux: 2 Mac: 1 Windows: 2Apr 19 Linux: 1 Mac: 0 Windows: 2Apr 18 Linux: 1 Mac: 1 Windows: 4Apr 17 Linux: 2 Mac: 2 Windows: 6Apr 16 Linux: 2 Mac: 4 Windows: 4Apr 15 Linux: 1 Mac: 3 Windows: 4Apr 14 Linux: 0 Mac: 7 Windows: 8Apr 13 Linux: 2 Mac: 1 Windows: 4Apr 12 Linux: 1 Mac: 1 Windows: 4Apr 11 Linux: 2 Mac: 0 Windows: 4Apr 10 Linux: 1 Mac: 3 Windows: 3Apr 9 Linux: 1 Mac: 5 Windows: 6Apr 8 Linux: 2 Mac: 5 Windows: 7Apr 7 Linux: 1 Mac: 4 Windows: 4Apr 6 Linux: 0 Mac: 1 Windows: 3Apr 5 Linux: 2 Mac: 4 Windows: 2Apr 4 Linux: 1 Mac: 5 Windows: 5Apr 3 Linux: 2 Mac: 4 Windows: 6Apr 2 Linux: 1 Mac: 1 Windows: 2Apr 1 Linux: 4 Mac: 2 Windows: 2May 16 Linux: 2 Mac: 0 Windows: 1May 15 Linux: 2 Mac: 5 Windows: 4May 14 Linux: 2 Mac: 1 Windows: 4May 13 Linux: 2 Mac: 4 Windows: 6May 12 Linux: 3 Mac: 5 Windows: 5May 11 Linux: 3 Mac: 1 Windows: 1May 10 Linux: 1 Mac: 1 Windows: 3May 9 Linux: 2 Mac: 2 Windows: 4May 8 Linux: 4 Mac: 2 Windows: 6May 7 Linux: 3 Mac: 1 Windows: 6May 6 Linux: 2 Mac: 4 Windows: 2May 5 Linux: 0 Mac: 1 Windows: 3May 4 Linux: 0 Mac: 1 Windows: 0May 3 Linux: 0 Mac: 1 Windows: 3May 2 Linux: 2 Mac: 4 Windows: 2May 1 Linux: 0 Mac: 4 Windows: 2Apr 30 Linux: 1 Mac: 1 Windows: 6Apr 29 Linux: 3 Mac: 6 Windows: 5Apr 28 Linux: 5 Mac: 1 Windows: 4Apr 27 Linux: 0 Mac: 2 Windows: 4Apr 26 Linux: 0 Mac: 4 Windows: 2Apr 25 Linux: 4 Mac: 3 Windows: 2Apr 24 Linux: 2 Mac: 5 Windows: 5Apr 23 Linux: 3 Mac: 2 Windows: 3Apr 22 Linux: 1 Mac: 3 Windows: 4Apr 21 Linux: 5 Mac: 3 Windows: 4Apr 20 Linux: 2 Mac: 1 Windows: 2Apr 19 Linux: 1 Mac: 0 Windows: 2Apr 18 Linux: 1 Mac: 1 Windows: 4Apr 17 Linux: 2 Mac: 2 Windows: 6Apr 16 Linux: 2 Mac: 4 Windows: 4Apr 15 Linux: 1 Mac: 3 Windows: 4Apr 14 Linux: 0 Mac: 7 Windows: 8Apr 13 Linux: 2 Mac: 1 Windows: 4Apr 12 Linux: 1 Mac: 1 Windows: 4Apr 11 Linux: 2 Mac: 0 Windows: 4Apr 10 Linux: 1 Mac: 3 Windows: 3Apr 9 Linux: 1 Mac: 5 Windows: 6Apr 8 Linux: 2 Mac: 5 Windows: 7Apr 7 Linux: 1 Mac: 4 Windows: 4Apr 6 Linux: 0 Mac: 1 Windows: 3Apr 5 Linux: 2 Mac: 4 Windows: 2Apr 4 Linux: 1 Mac: 5 Windows: 5Apr 3 Linux: 2 Mac: 4 Windows: 6Apr 2 Linux: 1 Mac: 1 Windows: 2Apr 1 Linux: 4 Mac: 2 Windows: 2

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:

  1. Install Node.js (and npm on Linux).

  2. Install eslint globally by typing the following in a terminal:

npm install -g eslint

Install plugin

Install this plugin by using Sublime Text Package Control.

  1. Open “Command Pallet” Ctrl + Shift + p (Cmd + Shift + p on OSX)
  2. Select “Package Control: Install Package”
  3. 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