Skip to content

ESlint#

Server#

For more information about the LSP server, check eslint.

Installation#

This Server supports automatic install. Install this language server with M-xlsp-install-serverRETeslintRET.

Debugger: N/A#

Available configurations#

lsp-eslint-auto-fix-on-save#

Type: boolean

Default: nil

Turns auto fix on save on or off.


lsp-eslint-code-action-disable-rule-comment#

Type: bool

Default: t

Controls whether code actions to add a rule-disabling comment should be shown.


lsp-eslint-code-action-disable-rule-comment-location#

Type: (choice (const separateLine) (const sameLine))

Default: separateLine

Controls where the disable rule code action places comments.

Accepts the following values: - "separateLine": Add the comment above the line to be disabled (default). - "sameLine": Add the comment on the same line that will be disabled.


lsp-eslint-code-action-show-documentation#

Type: bool

Default: t

Controls whether code actions to show documentation for an eslint rule should be shown.


lsp-eslint-enable#

Type: boolean

Default: t

Controls whether eslint is enabled for JavaScript files or not.


lsp-eslint-experimental-incremental-sync#

Type: boolean

Default: t

Controls whether the new incremental text document synchronization should be used.


lsp-eslint-fix-all-problem-type#

Type: (choice (const all) (const problems) string)

Default: all

Determines which problems are fixed when running the source.fixAll code action.


lsp-eslint-format#

Type: boolean

Default: t

Whether to perform format.


lsp-eslint-library-choices-file#

Type: string

Default: /home/runner/.emacs.d/.lsp-eslint-choices

The file where choices to permit or deny ESLint libraries from running is stored.


lsp-eslint-lint-task-enable#

Type: boolean

Default: nil

Controls whether a task for linting the whole workspace will be available.


lsp-eslint-lint-task-options#

Type: string

Default: .

Command line options applied when running the task for linting the whole workspace (see https://eslint.org/docs/user-guide/command-line-interface).


lsp-eslint-node#

Type: file

Default: node

Path to nodejs.


lsp-eslint-node-path#

Type: (repeat string)

Default: nil

A path added to NODE_PATH when resolving the eslint module.


lsp-eslint-options#

Type: alist

Default: nil

The eslint options object to provide args normally passed to eslint when executed from a command line (see http://eslint.org/docs/developer-guide/nodejs-api#cliengine).


lsp-eslint-package-manager#

Type: (choice (const :tag npm npm) (const :tag yarn yarn) (const :tag pnpm pnpm) (string :tag other))

Default: npm

The package manager you use to install node modules.


lsp-eslint-provide-lint-task#

Type: boolean

Default: nil

Controls whether a task for linting the whole workspace will be available.


lsp-eslint-quiet#

Type: boolean

Default: nil

Turns on quiet mode, which ignores warnings.


lsp-eslint-rules-customizations#

Type: (lsp-repeatable-vector (alist :options ((rule string) (severity (choice (const off) (const info) (const warn) (const error) (const upgrade) (const downgrade) (const default))))))

Default: []

Controls severity overrides for eslint rules.

The value is a vector of alists, with each alist containing the following keys: - rule - The rule to match. Can match wildcards with *, or be prefixed with ! to negate the match. - severity - The severity to report this rule as. Can be one of the following: - "off": Disable the rule. - "info": Report as informational. - "warn": Report as a warning. - "error": Report as an error. - "upgrade": Increase by 1 severity level (eg. warning -> error). - "downgrade": Decrease by 1 severity level (eg. warning -> info). - "default": Report as the same severity specified in the eslint config.


lsp-eslint-run#

Type: (choice (const :tag onSave onSave) (const :tag onType onType))

Default: onType

Run the linter on save (onSave) or on type (onType)


lsp-eslint-runtime#

Type: (repeat string)

Default: nil

The location of the node binary to run ESLint under.


lsp-eslint-save-library-choices#

Type: boolean

Default: t

Controls whether to remember choices made to permit or deny ESLint libraries from running.


lsp-eslint-server-command#

Type: (repeat string)

Default: (node ~/server/out/eslintServer.js --stdio)

Command to start eslint server.


lsp-eslint-trace-server#

Type: string

Default: off

Traces the communication between VSCode and the eslint linter service.


lsp-eslint-unzipped-path#

Type: file

Default: ~/.emacs.d/.cache/lsp/eslint-2.1.23/unzipped

The path to the file in which eslint will be stored.


lsp-eslint-validate#

Type: (repeat string)

Default: (svelte)

An array of language ids which should always be validated by eslint.


lsp-eslint-warn-on-ignored-files#

Type: bool

Default: nil

Controls whether a warning should be emitted when a file is ignored.


lsp-eslint-working-directories#

Type: lsp-string-vector

Default: []



Last update: September 19, 2021