ESLint Fix
Sublime Text plugin to run eslint --fix on the current file
Details
Installs
- Total 11K
- Win 4K
- Mac 5K
- Linux 2K
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 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 2 |
Mac | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime ESLint Fix
A Sublime Text 3 plugin to run eslint –fix on the current file
Installation
Dependencies
This plugin requires ESLint in order to function. For information on installing ESLint, check out the Getting Started guide.
Plugin Installation
This plugins is installable via Package Control.
To install via Package Control, do the following:
Within Sublime Text, bring up the Command Palette and type
install
. Among the commands you should seePackage Control: Install Package
. If that command is not highlighted, use the keyboard or mouse to select it. There will be a pause of a few seconds while Package Control fetches the list of available plugins.When the plugin list appears, type
eslint fix
. Among the entries you should seeESLint Fix
. Select this entry to install it.
Commands
Command Palette
- ESLint Fix: Fix this file
Default hotkeys:
- Linux/Windows: [Ctrl + KE]
- Mac: [Cmd + KE]
Settings
By default, the following settings are used:
{
// The paths to look for executables
"paths": {
"linux": [],
"osx": [],
"windows": []
},
// The location to search for a locally installed eslint package.
// These are all relative paths to a project's directory.
// If this is not found, it will try to fallback to a global package
// (see 'eslint_path' below)
"local_eslint_path": {
"windows": "node_modules/eslint/bin/eslint.js",
"linux": "node_modules/.bin/eslint",
"osx": "node_modules/.bin/eslint"
},
// Specify this path to an eslint config file to override the default behavior.
// Passed to eslint as --config. Read more here:
// http://eslint.org/docs/user-guide/command-line-interface#c---config
// If an absolute path is provided, it will use as is.
// Else, it will look for the file in the root of the project directory.
// Failing either, it will skip the config file
"config_path": {
"windows": "",
"linux": "",
"osx": ""
},
}
You can modify any settings by going to Preferences > Package Settings > ESLint Fix > Settings
.
Project-Specific Settings Override
To override global plugin configuration for a specific project, add a settings object with an eslint-fix
key in your .sublime-project
. This file is accessible via Project -> Edit Project
.
For example:
{
"folders": [
{
"path": "."
}
],
"settings": {
"config_path": {
"windows": "..."
}
}
}
Acknowledgments
While the code is unique, some of it is inspired by this plugin. My plugin differs by running on the current buffer instead of the last saved state of the file.