ctrl+shift+p filters: :st2 :st3 :win :osx :linux

更新时间:2021-04-15 13:17:37

Browse

LSP-eslint

by sublimelsp ST3

ESLint support for Sublime LSP plugin

Labels linting

Details

  • 1.4.2
    0.1.0
    0.0.6
  • github.​com
  • github.​com
  • 2 months ago
  • 19 minutes ago
  • 1 year ago

Installs

  • Total 1K
  • Win 244
  • Mac 487
  • Linux 286
Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1
Windows 0 0 1 1 1 1 2 0 3 2 0 1 2 1 1 1 1 4 1 3 4 3 1 2 3 0 0 1 0 0 2 2 1 0 1 1 1 2 0 1 2 0 1 0 1 4
Mac 2 3 5 3 3 0 3 3 9 4 0 1 3 4 1 1 3 3 4 2 1 0 1 4 1 2 0 3 1 2 2 0 2 2 0 2 4 2 3 2 1 2 1 0 2 0
Linux 1 2 1 0 0 1 2 1 8 3 0 2 1 0 1 1 1 1 0 1 1 2 3 4 0 0 1 2 1 1 0 2 0 0 0 2 0 0 1 4 2 2 4 2 1 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.

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 documentation for VSCode extension.

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"
        }
      }
    }
  }
}