LSP-eslint
ESLint support for Sublime LSP plugin
Details
Installs
- Total 12K
- Win 3K
- Mac 5K
- Linux 4K
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 | Jun 11 | Jun 10 | Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | May 21 | May 20 | May 19 | May 18 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 1 | 1 | 1 | 0 | 1 | 4 | 1 | 1 | 2 | 1 | 1 | 1 | 3 | 2 | 5 | 3 | 1 | 4 | 1 | 3 | 5 | 1 | 6 | 1 | 3 | 2 | 1 | 3 | 1 | 4 | 0 | 2 | 1 | 0 | 3 | 3 | 5 | 2 | 6 | 7 | 4 | 0 | 0 | 1 | 1 |
Mac | 0 | 1 | 2 | 0 | 3 | 2 | 0 | 2 | 7 | 3 | 2 | 3 | 3 | 1 | 2 | 1 | 2 | 2 | 2 | 0 | 1 | 5 | 3 | 2 | 0 | 1 | 5 | 4 | 3 | 3 | 6 | 1 | 0 | 6 | 6 | 3 | 1 | 1 | 2 | 2 | 0 | 3 | 2 | 5 | 3 | 2 |
Linux | 0 | 3 | 3 | 4 | 1 | 8 | 2 | 3 | 0 | 0 | 3 | 0 | 2 | 3 | 2 | 2 | 1 | 1 | 3 | 4 | 0 | 2 | 1 | 1 | 0 | 2 | 4 | 3 | 1 | 2 | 0 | 4 | 1 | 2 | 1 | 2 | 3 | 0 | 5 | 1 | 2 | 4 | 1 | 0 | 1 | 0 |
Readme
- Source
- raw.githubusercontent.com
LSP-eslint
Eslint support for Sublime's LSP plugin provided through vscode-eslint.
Installation
- Install LSP and
LSP-eslint
from Package Control. - Restart Sublime.
The server requires the Node runtime to be at version 14 or later.
Configuration
Open configuration file using command palette with Preferences: LSP-eslint Settings
command or opening it from the Sublime menu.
Configuration file contains multiple configuration keys:
languages
Defines on which types of files the ESLint server will run.
settings
ESLint configuration options. Refer to the comments for documentation and install LSP-json to automatically validate settings.
FAQ
Q: How to enable linting of Typescript code?
A: Make sure that eslint configuration in your project has typescript-eslint
plugin configured. See https://github.com/typescript-eslint/typescript-eslint for more information.
Q: How to enable eslint to fix all issues automatically on saving the file?
A: Open Preferences: LSP Settings
from the command palette and add or modify the following setting:
"lsp_code_actions_on_save": {
"source.fixAll.eslint": true,
},
Q: How to use this in a Yarn 2 project?
A: Install ESLint in the project, run yarn dlx @yarnpkg/pnpify --sdk base
(docs) and set settings.nodePath
to .yarn/sdks
either in LSP-eslint
's settings or, if you have other non-Yarn-2 projects, in your .sublime-project
:
{
"settings": {
"LSP": {
"LSP-eslint": {
"settings": {
"nodePath": ".yarn/sdks"
}
}
}
}
}