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

ESLint

by polygonplanet ALL

ESLint any JavaScript file in Sublime Text

Details

Installs

  • Total 154K
  • Win 59K
  • Mac 65K
  • Linux 29K
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12
Windows 0 7 7 6 5 4 1 1 4 3 2 6 5 2 4 5 4 3 9 7 3 5 4 9 4 8 2 3 3 4 7 6 6 5 2 3 4 7 5 4 6 3 3 5 15 4
Mac 0 9 4 2 7 6 1 3 3 6 2 3 5 2 4 4 3 4 5 3 4 0 8 3 3 2 3 4 1 3 4 2 4 1 2 2 1 1 4 9 2 4 0 1 2 4
Linux 0 1 3 5 2 1 2 3 2 2 3 1 3 2 1 2 5 0 3 3 2 2 1 1 1 8 2 4 1 1 0 2 3 3 1 0 3 9 4 6 3 4 4 3 4 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