|
1 | 1 | {
|
2 | 2 | "settings": {
|
| 3 | + // Whether to use the ESLint class API even if the CLIEngine API is present. The setting is only honored |
| 4 | + // when using using ESLint version 7.x. |
| 5 | + "useESLintClass": false, |
| 6 | + // Show disable lint rule in the quick fix menu. |
3 | 7 | "codeAction.disableRuleComment": {
|
4 | 8 | // Show the disable code actions.
|
5 | 9 | "enable": true,
|
6 | 10 | // Configure the disable rule code action to insert the comment on the `sameLine` or `separateLine`.
|
7 | 11 | "location": "separateLine"
|
8 | 12 | },
|
| 13 | + // Show open lint rule documentation web page in the quick fix. |
9 | 14 | "codeAction.showDocumentation": {
|
10 | 15 | // Show the documentation code actions.
|
11 | 16 | "enable": true
|
12 | 17 | },
|
13 | 18 | "codeActionOnSave.enable": true,
|
14 | 19 | // Specifies the code action mode. Possible values are 'all' and 'problems'.
|
15 | 20 | "codeActionOnSave.mode": "all",
|
| 21 | + // The rules that should be executed when computing the code actions on save or formatting a file. |
| 22 | + // Defaults to the rules configured via the ESLint configuration. |
| 23 | + // An empty array results in no rules being considered. |
| 24 | + // If the array contains more than one entry the order matters and the first match determines the rule's |
| 25 | + // on/off state. This setting is only honored if either ESLint version 8 or greater is used or ESLint |
| 26 | + // version 7 is used and the setting `useESLintClass` is set to `true`. |
| 27 | + // |
| 28 | + // In this example only semicolon related rules are considered: |
| 29 | + // |
| 30 | + // ```json |
| 31 | + // "codeActionOnSave.rules": [ |
| 32 | + // "*semi*" |
| 33 | + // ] |
| 34 | + // ``` |
| 35 | + // |
| 36 | + // This example removes all TypeScript ESLint specific rules from the code action on save pass but |
| 37 | + // keeps all other rules: |
| 38 | + // |
| 39 | + // ```json |
| 40 | + // "codeActionOnSave.rules": [ |
| 41 | + // "!@typescript-eslint/*", |
| 42 | + // "*" |
| 43 | + // ] |
| 44 | + // ``` |
| 45 | + // |
| 46 | + // This example keeps the indent and semi rule from TypeScript ESLint, disables all other TypeScript |
| 47 | + // ESLint rules and keeps the rest: |
| 48 | + // |
| 49 | + // ```json |
| 50 | + // "codeActionOnSave.rules": [ |
| 51 | + // "@typescript-eslint/semi", |
| 52 | + // "@typescript-eslint/indent", |
| 53 | + // "!@typescript-eslint/*", |
| 54 | + // "*" |
| 55 | + // ] |
| 56 | + // ``` |
| 57 | + // "codeActionOnSave.rules": [], |
16 | 58 | // Deprecated. Recommended to use the global LSP option `lsp_code_actions_on_save` with the.
|
17 | 59 | // `"source.fixAll.eslint": true` key instead.
|
18 | 60 | "format": false,
|
|
21 | 63 | // Whether ESLint should issue a warning on ignored files.
|
22 | 64 | // Possible values: `warn`, `off`
|
23 | 65 | "onIgnoredFiles": "off",
|
24 |
| - // The eslint options object to provide args normally passed to eslint when |
25 |
| - // executed from a command line (see https://eslint.org/docs/developer-guide/nodejs-api#cliengine). |
| 66 | + // Options to configure how ESLint is started using the [ESLint class API](http://eslint.org/docs/developer-guide/nodejs-api#eslint-class). |
| 67 | + // The server uses the ESLint class API if ESLint version 8 or higher is used or if ESLint version 7 is used, |
| 68 | + // and the setting `useESLintClass` is set to `true`. I all other cases the old CLIEngine API is used. |
| 69 | + // An example to point to a custom `.eslintrc.json` file using the new ESLint API is: |
| 70 | + // ```json |
| 71 | + // { |
| 72 | + // "eslint.options": { "overrideConfigFile": "C:/mydirectory/.eslintrc.json" } |
| 73 | + // } |
| 74 | + // ``` |
| 75 | + // An example to point to a custom `.eslintrc.json` file using the old CLIEngine API is: |
| 76 | + // ```json |
| 77 | + // { |
| 78 | + // "eslint.options": { "configFile": "C:/mydirectory/.eslintrc.json" } |
| 79 | + // } |
| 80 | + // ``` |
26 | 81 | "options": {},
|
27 | 82 | // The package manager you use to install node modules.
|
28 | 83 | // Possible values: `npm`, `yarn`, `pnpm`
|
|
73 | 128 | "env": {
|
74 | 129 | // Enables ESLint debug mode
|
75 | 130 | // "DEBUG": "eslint:*,-eslint:code-path",
|
76 |
| - // The value of NODE_ENV to use when running eslint tasks. |
| 131 | + // The value of `NODE_ENV` to use when running eslint tasks. |
77 | 132 | // "NODE_ENV": "production",
|
78 | 133 | },
|
79 | 134 | "languages": [
|
|
0 commit comments