LSP-eslint
ESLint support for Sublime LSP plugin
Details
Installs
- Total 10K
- Win 3K
- Mac 4K
- Linux 3K
Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 2 | 4 | 5 | 8 | 3 | 1 | 0 | 3 | 5 | 5 | 5 | 6 | 0 | 1 | 0 | 3 | 7 | 2 | 0 | 1 | 4 | 2 | 1 | 4 | 4 | 3 | 3 | 1 | 1 | 3 | 1 | 3 | 0 | 3 | 1 | 2 | 1 | 3 | 5 | 2 | 4 | 1 | 2 | 2 | 1 |
Mac | 0 | 1 | 4 | 6 | 2 | 3 | 0 | 1 | 2 | 2 | 1 | 1 | 4 | 3 | 0 | 3 | 3 | 4 | 4 | 4 | 6 | 1 | 4 | 4 | 5 | 7 | 6 | 3 | 4 | 2 | 3 | 1 | 6 | 1 | 2 | 1 | 1 | 6 | 3 | 1 | 1 | 5 | 0 | 1 | 3 | 2 |
Linux | 0 | 2 | 3 | 3 | 2 | 6 | 0 | 2 | 3 | 4 | 6 | 4 | 2 | 1 | 1 | 4 | 1 | 2 | 4 | 2 | 3 | 4 | 2 | 4 | 5 | 4 | 5 | 8 | 0 | 3 | 4 | 2 | 1 | 3 | 2 | 11 | 0 | 1 | 1 | 6 | 4 | 5 | 2 | 0 | 1 | 2 |
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"
}
}
}
}
}