forked from sublimelsp/LSP-eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LSP-eslint.sublime-settings
135 lines (135 loc) · 5.12 KB
/
LSP-eslint.sublime-settings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
"settings": {
// Whether to use the ESLint class API even if the CLIEngine API is present. The setting is only honored
// when using using ESLint version 7.x.
"useESLintClass": false,
// Show disable lint rule in the quick fix menu.
"codeAction.disableRuleComment": {
// Show the disable code actions.
"enable": true,
// Configure the disable rule code action to insert the comment on the `sameLine` or `separateLine`.
"location": "separateLine"
},
// Show open lint rule documentation web page in the quick fix.
"codeAction.showDocumentation": {
// Show the documentation code actions.
"enable": true
},
"codeActionOnSave.enable": true,
// Specifies the code action mode. Possible values are 'all' and 'problems'.
"codeActionOnSave.mode": "all",
// The rules that should be executed when computing the code actions on save or formatting a file.
// Defaults to the rules configured via the ESLint configuration.
// An empty array results in no rules being considered.
// If the array contains more than one entry the order matters and the first match determines the rule's
// on/off state. This setting is only honored if either ESLint version 8 or greater is used or ESLint
// version 7 is used and the setting `useESLintClass` is set to `true`.
//
// In this example only semicolon related rules are considered:
//
// ```json
// "codeActionOnSave.rules": [
// "*semi*"
// ]
// ```
//
// This example removes all TypeScript ESLint specific rules from the code action on save pass but
// keeps all other rules:
//
// ```json
// "codeActionOnSave.rules": [
// "!@typescript-eslint/*",
// "*"
// ]
// ```
//
// This example keeps the indent and semi rule from TypeScript ESLint, disables all other TypeScript
// ESLint rules and keeps the rest:
//
// ```json
// "codeActionOnSave.rules": [
// "@typescript-eslint/semi",
// "@typescript-eslint/indent",
// "!@typescript-eslint/*",
// "*"
// ]
// ```
// "codeActionOnSave.rules": [],
// Deprecated. Recommended to use the global LSP option `lsp_code_actions_on_save` with the.
// `"source.fixAll.eslint": true` key instead.
"format": false,
// A path added to NODE_PATH when resolving the eslint module (auto-detected by default).
"nodePath": null,
// Whether ESLint should issue a warning on ignored files.
// Possible values: `warn`, `off`
"onIgnoredFiles": "off",
// Options to configure how ESLint is started using the [ESLint class API](http://eslint.org/docs/developer-guide/nodejs-api#eslint-class).
// The server uses the ESLint class API if ESLint version 8 or higher is used or if ESLint version 7 is used,
// and the setting `useESLintClass` is set to `true`. I all other cases the old CLIEngine API is used.
// An example to point to a custom `.eslintrc.json` file using the new ESLint API is:
// ```json
// {
// "eslint.options": { "overrideConfigFile": "C:/mydirectory/.eslintrc.json" }
// }
// ```
// An example to point to a custom `.eslintrc.json` file using the old CLIEngine API is:
// ```json
// {
// "eslint.options": { "configFile": "C:/mydirectory/.eslintrc.json" }
// }
// ```
"options": {},
// The package manager you use to install node modules.
// Possible values: `npm`, `yarn`, `pnpm`
"packageManager": "npm",
// An array of language ids for which the plugin should probe if support is installed.
"probe": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"vue",
"markdown",
],
// Override the severity of one or more rules, regardless of the project's ESLint config. Use globs to
// apply default severities for multiple rules.
"rulesCustomizations": [],
// Turns on quiet mode, which ignores warnings.
"quiet": false,
// Run the linter on save or on type.
// Possible values: `onSave`, `onType`
"run": "onType",
// An array of language ids which should be validated by ESLint.
"validate": [
"javascript",
"javascriptreact",
],
// An optional list of working directories or a setting on how those are auto-resolved.
//
// This setting will normally only be set per-project to provide a list of working
// directories. The server will consider those as bases for resolving the eslint configuration.
//
// Refer to the `eslint.workingDirectories` documentation at https://github.com/Microsoft/vscode-eslint
// for more info.
//
// NOTE that the `{ "pattern": glob pattern }` variant is not supported in LSP-eslint.
// "workingDirectories": null
},
// File watching functionality only works with "LSP-file-watcher-chokidar" package installed.
"file_watcher": {
"patterns": [
"**/.eslintr{c.js,c.cjs,c.yaml,c.yml,c,c.json}",
"**/.eslintignore",
"**/package.json",
]
},
"command": ["${node_bin}", "${server_path}", "--stdio"],
"selector": "source.js | source.ts | source.jsx | source.tsx | source.js.jsx | source.js.react | source.ts.react | text.html.vue | text.html.basic",
"env": {
// Enables ESLint debug mode
// "DEBUG": "eslint:*,-eslint:code-path",
// The value of `NODE_ENV` to use when running eslint tasks.
// "NODE_ENV": "production",
},
}