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