-
Notifications
You must be signed in to change notification settings - Fork 5
/
sublime-package.json
406 lines (406 loc) · 20.3 KB
/
sublime-package.json
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
{
"contributions": {
"settings": [
{
"file_patterns": [
"/LSP-eslint.sublime-settings"
],
"schema": {
"$id": "sublime://settings/LSP-eslint",
"definitions": {
"PluginConfig": {
"properties": {
"env": {
"properties": {
"DEBUG": {
"type": "string",
"default": "",
"description": "Enables ESLint debug mode (same as --debug on the command line)"
},
"NODE_ENV": {
"type": "string",
"default": "",
"markdownDescription": "The value of `NODE_ENV` to use when running eslint tasks."
},
}
},
"settings": {
"additionalProperties": false,
"properties": {
"problems.shortenToSingleLine": {
"type": "boolean",
"default": false,
"description": "Shortens the text spans of underlined problems to their first related line."
},
"useFlatConfig": {
"type": ["boolean", "null"],
"default": null,
"markdownDescription": "Controls whether flat config should be used or not. This setting requires ESLint version 8.57 or later and is interpreted according to the [ESLint Flat Config rollout plan](https://eslint.org/blog/2023/10/flat-config-rollout-plans/). This means:\n\n - *8.57.0 <= ESLint version < 9.x*: setting is honored and defaults to false\n- *9.0.0 <= ESLint version < 10.x*: settings is honored and defaults to true\n- *10.0.0 <= ESLint version*: setting is ignored. Flat configs are the default and can't be turned off."
},
"experimental.useFlatConfig": {
"type": "boolean",
"default": false,
"deprecationMessage": "Use ESLint version 8.57 or later and `useFlatConfig` instead.",
"description": "Enables support of experimental Flat Config (aka eslint.config.js). Requires ESLint version >= 8.21 < 8.57.0)."
},
"codeActionOnSave.enable": {
"type": "boolean",
"default": true,
"description": "Enables functionality to run code actions on save."
},
"codeActionOnSave.mode": {
"type": "string",
"default": "all",
"enum": [
"all",
"problems"
],
"enumDescriptions": [
"Fixes all possible problems in the file. This option might take some time.",
"Fixes only reported problems that have non-overlapping textual edits. This option runs a lot faster."
],
"markdownDescription": "Specifies the code action mode. Possible values are `all` and `problems`."
},
"codeActionOnSave.rules": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "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.\nIf 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`.\n\nIn this example only semicolon related rules are considered:\n\n\n```json\n\"codeActionOnSave.rules\": [\n \"*semi*\"\n]\n```\n\n\nThis example removes all TypeScript ESLint specific rules from the code action on save pass but keeps all other rules:\n\n\n```json\n\"codeActionOnSave.rules\": [\n \"!@typescript-eslint/*\",\n \"*\"\n]\n```\n\n\nThis example keeps the indent and semi rule from TypeScript ESLint, disables all other TypeScript ESLint rules and keeps the rest:\n\n\n```json\n\"codeActionOnSave.rules\": [\n \"@typescript-eslint/semi\",\n \"@typescript-eslint/indent\",\n \"!@typescript-eslint/*\",\n \"*\"\n]\n```"
},
"format": {
"type": "boolean",
"default": false,
"markdownDescription": "**Deprecated**. Enables DocumentFormattingRequest notification.\n\nRecommended to use global LSP option `lsp_code_actions_on_save` with the `\"source.fixAll.eslint\": true` key instead."
},
"packageManager": {
"type": "string",
"enum": [
"npm",
"yarn",
"pnpm"
],
"default": "npm",
"description": "The package manager you use to install node modules.",
"deprecationMessage": "The setting is deprecated. The Package Manager is automatically detected now."
},
"nodePath": {
"type": [
"string",
"null"
],
"default": null,
"markdownDescription": "A path added to `NODE_PATH` when resolving the eslint module."
},
"options": {
"type": "object",
"default": {},
"markdownDescription": "Options to configure how ESLint is started using the [ESLint class API](https://eslint.org/docs/developer-guide/nodejs-api#eslint-class). The extension 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`. In all other cases the old CLIEngine API is used.\n\n An example to point to a custom `.eslintrc.json` file using the new ESLint API is:\n ```json\n {\n \"eslint.options\": { \"overrideConfigFile\": \"C:/mydirectory/.eslintrc.json\" }\n }\n ```\n\n An example to point to a custom `.eslintrc.json` file using the old CLIEngine API is:\n ```json\n {\n \"eslint.options\": { \"configFile\": \"C:/mydirectory/.eslintrc.json\" }\n }\n ```"
},
"useESLintClass": {
"type": "boolean",
"default": false,
"markdownDescription": "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."
},
"ignoreUntitled": {
"type": "boolean",
"default": false,
"description": "If true, untitled files won't be validated by ESLint."
},
"probe": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"astro",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"mdx",
"vue",
"markdown",
"json",
"jsonc"
],
"description": "An array of language ids for which the plugin should probe if support is installed."
},
"run": {
"type": "string",
"enum": [
"onSave",
"onType"
],
"default": "onType",
"markdownDescription": "Run the linter on save (`onSave`) or on type (`onType`)"
},
"quiet": {
"type": "boolean",
"default": false,
"description": "Turns on quiet mode, which ignores warnings."
},
"onIgnoredFiles": {
"type": "string",
"enum": [
"warn",
"off"
],
"default": "off",
"description": "Whether ESLint should issue a warning on ignored files."
},
"workingDirectories": {
"type": "array",
"markdownDescription": "Specifies how the working directories ESLint is using are computed. ESLint resolves configuration files (e.g. `eslintrc`, `.eslintignore`) relative to a working directory so it is important to configure this correctly.",
"defaultSnippets": [
{
"body": [
"./folder1",
"./folder2",
]
},
{
"body": [
{
"mode": "location"
}
]
},
{
"body": [
{
"directory": "./folder",
"!cwd": true
}
]
}
],
"items": {
"anyOf": [
{
"type": "string",
"description": "The project-relative path of the working directory."
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"auto",
"location"
],
"markdownEnumDescriptions": [
"Instructs ESLint to infer a working directory based on the location of `package.json`, `.eslintignore` and `.eslintrc*` files. This might work in many cases but can lead to unexpected results as well.",
"Instructs ESLint to uses the workspace folder location or the file location (if no workspace folder is open) as the working directory. This is the default."
],
"default": "location",
},
},
"required": [
"mode"
]
},
{
"type": "object",
"properties": {
"directory": {
"type": "string",
"description": "The working directory to use if a file's path starts with this directory."
},
"changeProcessCWD": {
"type": "boolean",
"description": "Whether the process's cwd should be changed as well."
}
},
"deprecationMessage": "Use the new !cwd form.",
"required": [
"directory"
]
},
{
"type": "object",
"properties": {
"directory": {
"type": "string",
"description": "The working directory to use if a file's path starts with this directory."
},
"!cwd": {
"type": "boolean",
"description": "Set to true if ESLint shouldn't change the working directory."
}
},
"required": [
"directory"
]
},
{
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "A glob pattern to match a working directory."
},
"!cwd": {
"type": "boolean",
"description": "Set to true if ESLint shouldn't change the working directory."
}
},
"markdownDescription": "**Not supported in ST**. Allows to specify a pattern to detect the working directory. This is basically a short cut for listing every directory. If you have a mono repository with all your projects being below a packages folder you can use `{ \"pattern\": \"./packages/*/\" }` to make all these folders working directories.",
"required": [
"pattern"
]
}
]
}
},
"validate": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"javascript",
"javascriptreact"
],
"description": "An array of language ids which should be validated by ESLint. If not installed ESLint will show an error."
},
"codeAction.disableRuleComment": {
"type": "object",
"default": {
"enable": true,
"location": "separateLine",
"commentStyle": "line"
},
"properties": {
"enable": {
"type": "boolean",
"default": true,
"description": "Show the disable code actions."
},
"location": {
"type": "string",
"enum": [
"separateLine",
"sameLine"
],
"default": "separateLine",
"description": "Configure the disable rule code action to insert the comment on the same line or a new line."
},
"commentStyle": {
"type": "string",
"enum": [
"line",
"block"
],
"default": "line",
"definition": "The comment style to use when disabling a rule on a specific line."
}
},
"additionalProperties": false,
"markdownDescription": "Show disable lint rule in the quick fix menu."
},
"codeAction.showDocumentation": {
"type": "object",
"default": {
"enable": true
},
"properties": {
"enable": {
"type": "boolean",
"default": true,
"description": "Show the documentation code actions."
}
},
"additionalProperties": false,
"markdownDescription": "Show open lint rule documentation web page in the quick fix menu."
},
"rulesCustomizations": {
"markdownDescription": "Override the severity of one or more rules, regardless of the project's ESLint config. Use globs to apply default severities for multiple rules. Contains two properties:\n\n - `\"rule\"`: Select on rules with names that match, factoring in asterisks as wildcards: `{ \"rule\": \"no-*\", \"severity\": \"warn\" }`. Prefix the name with a `\"!\"` to target all rules that _don't_ match the name: `{ \"rule\": \"!no-*\", \"severity\": \"info\" }`\n - `\"severity\"`: Sets a new severity for matched rule(s), `\"downgrade\"`s them to a lower severity, `\"upgrade\"`s them to a higher severity, or `\"default\"`s them to their original severity\n\nIn this example, all rules are overridden to warnings:\n```json\n\"eslint.rules.customizations\": [\n { \"rule\": \"*\", \"severity\": \"warn\" }\n]\n```\n\nIn this example, `no-` rules are informative, other rules are downgraded, and `\"radix\"` is reset to default:\n```json\n\"eslint.rules.customizations\": [\n { \"rule\": \"no-*\", \"severity\": \"info\" },\n { \"rule\": \"!no-*\", \"severity\": \"downgrade\" },\n { \"rule\": \"radix\", \"severity\": \"default\" }\n]\n```",
"items": {
"properties": {
"severity": {
"enum": [
"downgrade",
"error",
"info",
"default",
"upgrade",
"warn",
"off"
],
"type": "string"
},
"rule": {
"type": "string"
},
},
"required": ["severity", "rule"],
"defaultSnippets": [
{
"body": {
"rule": "$1",
"severity": "$0"
}
}
],
"type": "object"
},
"type": "array"
}
}
}
},
},
},
"allOf": [
{
"$ref": "sublime://settings/LSP-plugin-base"
},
{
"$ref": "sublime://settings/LSP-eslint#/definitions/PluginConfig"
}
],
}
},
{
"file_patterns": [
"/*.sublime-project"
],
"schema": {
"properties": {
"settings": {
"properties": {
"LSP": {
"properties": {
"LSP-eslint": {
"$ref": "sublime://settings/LSP-eslint#/definitions/PluginConfig"
}
}
}
}
}
}
}
},
{
"file_patterns": [
"LSP.sublime-settings"
],
"schema": {
"properties": {
"lsp_code_actions_on_save": {
"properties": {
"source.fixAll.eslint": {
"type": "boolean"
},
}
}
}
}
}
]
}
}