LSP-eslint
ESLint support for Sublime LSP plugin
Details
Installs
- Total 10K
- Win 3K
- Mac 4K
- Linux 3K
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 | Jun 11 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 6 | 1 | 3 | 7 | 3 | 2 | 3 | 5 | 2 | 5 | 2 | 2 | 3 | 1 | 4 | 0 | 0 | 5 | 2 | 2 | 1 | 3 | 5 | 0 | 2 | 4 | 3 | 1 | 3 | 4 | 2 | 1 | 3 | 4 | 1 | 4 | 2 | 1 | 2 | 2 | 3 | 7 | 1 | 3 | 3 | 5 |
Mac | 1 | 2 | 5 | 4 | 3 | 2 | 0 | 1 | 1 | 3 | 3 | 3 | 0 | 3 | 4 | 3 | 5 | 2 | 4 | 2 | 4 | 2 | 4 | 2 | 3 | 4 | 1 | 0 | 4 | 4 | 9 | 8 | 3 | 1 | 6 | 4 | 3 | 5 | 3 | 1 | 3 | 2 | 3 | 1 | 2 | 2 |
Linux | 2 | 2 | 3 | 5 | 1 | 3 | 3 | 2 | 2 | 4 | 8 | 5 | 2 | 3 | 5 | 4 | 6 | 5 | 5 | 1 | 1 | 3 | 2 | 5 | 3 | 1 | 4 | 1 | 3 | 3 | 2 | 3 | 1 | 2 | 3 | 2 | 2 | 9 | 6 | 3 | 11 | 1 | 1 | 7 | 3 | 3 |
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"
}
}
}
}
}