-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigurationType.ts
809 lines (806 loc) · 28.1 KB
/
configurationType.ts
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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
import { ScriptElementKind, ScriptKind, LanguageService } from 'typescript/lib/tsserverlibrary'
type ReplaceRule = {
/**
* Name of completion
* e.g. `readFile`, `^readFile` (global) or `fs.readFile`
*/
suggestion: string
/**
* Also its possible to specify any other completion properties. For example:
* - sourceDisplay
*/
filter?: {
kind?: keyof Record<ScriptElementKind, string>
fileNamePattern?: string
languageMode?: keyof typeof ScriptKind
}
/** by default only first entry is processed */
processMany?: boolean
delete?: boolean
/**
* - true - original suggestion will be shown below current
*/
duplicateOriginal?: boolean | 'above'
patch?: Partial<{
name: string
kind: keyof typeof ScriptElementKind
/** Might be useless when `correctSorting.enable` is true */
sortText: string
insertText: string | true
/** Wether insertText differs from completion name */
snippetLike: boolean
labelDetails: {
/** on the right */
detail?: string
description?: string
}
}>
/** Works only with `correctSorting.enable` set to true (default) */
// movePos?: number
/** When specified, `movePos` is ignored */
// TODO!
// movePosAbsolute?: number
// or
// insertAfter?: string
/** Not recommended to use as it would override possible `?` insertion */
// replaceExisting?: string
}
// For easier testing, specify every default
// TODO support scripting
export type Configuration = {
/**
* Controls wether TypeScript Essentials plugin is enabled or not.
* Does not affect Vue support enablement
* @default true
*/
enablePlugin: boolean
/**
* Wether to enable support in Volar support via Volar config file, mainly for Vue SFC files and takeover mode.
* Changing setting from true to false requires Volar server restart
* @default false
*/
enableVueSupport: boolean
/**
* Temporary setting to enable loading config from other locations (also to expose plugin)
*/
// volarLoadConfigPaths: string[]
/**
* Removes annoying `Symbol`, `caller`, `prototype` everywhere
* @default true
* */
'removeUselessFunctionProps.enable': boolean
/**
* Of course it makes no sense to use `remove`, but `mark` might be really useful
* @recommended mark
* @default disable
*/
'globalLibCompletions.action': 'disable' | 'mark' | 'remove'
/**
* Useful for Number types.
* Patch `toString()`: Removes arg tabstop
* @default true
*/
'patchToString.enable': boolean
/**
* Format of this setting is very close to `jsxCompletionsMap` setting:
* `path#symbol` (exact) or `path/*#symbol` (`#symbol` part can be omitted)
*
* **Note**: Please use builtin `javascript`/`typescript.preferences.autoImportFileExcludePatterns` when possible, to achieve better performance!
* The builtin function expects relative paths to .d.ts / .ts files that contains declarations.
*
* e.g. instead of declaring `@mui/icons-material` here, declare `node_modules/@mui/icons-material` in aforementioned setting.
*
* And only use this, if auto-imports coming not from physical files (e.g. some modules node imports)
*
* Examples:
* - `path` - ignore path, but not path/posix or path/win32 modules
* - `path/*` - ignore path, path/posix and path/win32
* - `path/*#join` - ignore path, path/posix and path/win32, but only join symbol
* - `path/*#join,resolve` - ignore path, path/posix and path/win32, but only join and resolve symbol
*
* - jquery/* - ignore absolutely all auto imports from jquery, even if it was declared using ambient declaration (`declare module`)
* @default []
*/
'suggestions.ignoreAutoImports': string[]
/**
* Disable it only if it causes problems / crashes with TypeScript, which of course should never happen
* But it wasn't tested on very old versions
* @default false
*/
// 'advanced.disableAutoImportCodeFixPatching': boolean
/**
* What insert text to use for keywords (e.g. `return`)
* @default space
*/
'suggestions.keywordsInsertText': 'none' | 'space'
/**
* Wether to show module name from which completion comes (inserted at start of completion detail)
* @recommended
* @default short-format
*/
'suggestions.displayImportedInfo': 'disable' | 'short-format' | 'long-format'
/**
* @recommended
* @default false
*/
'suggestions.localityBonus': boolean
/**
* position = cursor position
* @default prefer-before-position
*/
'suggestions.localityBonusMode': 'prefer-before-position' | 'nearest-to-position'
// TODO! correct watching!
/**
* Wether to enable snippets for array methods like `items.map(item => )`
* @default false
*/
'arrayMethodsSnippets.enable': boolean
/**
* Add tabstop at arg so you can easily change it or add `i`
* If set to `false`, arg is added without parentheses
* @default true
*/
'arrayMethodsSnippets.addArgTabStop': boolean
/**
* Add outer tabstop so you can easily pass callback instead
* @default false
*/
'arrayMethodsSnippets.addOuterTabStop': boolean
/**
* If set to `false` and singular item name can't be inferred, feature will be disabled
* @default item
*/
'arrayMethodsSnippets.defaultItemName': string | false
/**
* E.g. `entries.filter(e => )` instead of `entries.filter(entry => )`
*
* @default false
*/
'arrayMethodsSnippets.inferredFirstLetterOnly': boolean
/**
* Highlights non-function methods. Also applies for static class methods. Activates when `bind`, `call`, `apply`, `arguments` completions detected.
* @default true
* */
'highlightNonFunctionMethods.enable': boolean
/**
* Normalize sorting of suggestions after plugin modifications
* You most probably don't need to disable it
* @default true
* */
'correctSorting.enable': boolean
/**
* Try to restore properties (not variables!) sorting as in source
* Experimental and most probably will be changed in future
* @recommended
* @default false
*/
fixSuggestionsSorting: boolean
// TODO-low
/**
* Mark refactorings with 🔵
* @default true
*/
'markTsCodeActions.enable': boolean
/**
* Leave empty to disable
* @default 🔵
*/
'markTsCodeFixes.character': string
// TODO
/**
* Reveal definition in import statement instead of real definition in another file
* @default true
* */
// 'importUpDefinition.enable': boolean
/**
* Remove definitions for TS module declarations e.g. *.css
* Enable it if your first definition that receives focus is TS module declaration instead of target file itself
* Might be really really useful in some cases
* @default false
*/
removeModuleFileDefinitions: boolean
/**
* Enable definitions for strings that appears to be paths (relatively to file)
* Also must have and should be enabled if you work with path.join a lot
* @default false
*/
enableFileDefinitions: boolean
/**
* When not in node_modules, show skip showing references from node_modules
* @default false
* @recommended
*/
skipNodeModulesReferences: boolean
/**
* @default true
* */
'removeCodeFixes.enable': boolean
/**
* @default ["fixMissingFunctionDeclaration"]
* @uniqueItems true
* */
'removeCodeFixes.codefixes': FixId[]
/**
* Also rename name of default or namespace import on refactor caused by file move / rename
* Probably will be enabled by default in future
* @default false
* @recommended
*/
renameImportNameOfFileRename: boolean
/**
* Additional file extension to include in completions (suggestions)
*
* **For unchecked files only**, for checked files use module augmentation.
* Example: `["css"]` or `["*"]` that will include literally every file extension
* @default []
*/
additionalIncludeExtensions: string[]
/**
* Patterns to exclude from workspace symbol search
* Example: `["**\/node_modules/**"]`
* @uniqueItems true
* @default ["**\/node_modules/**"]
*/
workspaceSymbolSearchExcludePatterns: string[]
/**
* Use strict & precise emmet in jsx/tsx files! Doesn't annoy you everywhere!
* Requires `jsxPseudoEmmet.enabled` to be disabled and `emmet.excludeLanguages` to have `javascriptreact` / `typescriptreact`
* @default true
* */
'jsxEmmet.enable': boolean
/**
* Override snippet inserted on `.` literally
* @default false
*/
'jsxEmmet.dotOverride': string | false
/**
* Wether to provide signature help when destructuring tuples e.g.:
*
* ```ts
* declare const foo: [x: number, y: number]
* const [] = foo
* ```
* @recommended
* @default false
*/
tupleHelpSignature: boolean
/**
* We already change sorting of suggestions, but enabling this option will also make:
* - removing `id` from input suggestions
* - simplify textarea
* - removes uppercase suggestions e.g. `Foo` (write React component name after `<` for proper completions)
* Doesn't change preview text for now!
* @default false
*/
'jsxEmmet.modernize': boolean
/**
* Suggests only common tags such as div
* @default false
*/
'jsxPseudoEmmet.enable': boolean
/**
* Note: Sorting matters
*/
'jsxPseudoEmmet.tags': { [tag: string]: true | string }
/**
* Exclude lowercase / incorrect suggestions
* @default true
*/
'jsxImproveElementsSuggestions.enabled': boolean
/**
* Recommended to enable to experience less useless suggestions unless you are using JSX Elements declared in namespaces
* @default false
*/
'jsxImproveElementsSuggestions.filterNamespaces': boolean
/**
* Requires TS server restart. Recommended to enable only per project.
*
* Enables better lib.dom completions (such as input events). For JS projects only (that don't use `tsc`)!
* @default false
* */
libDomPatching: boolean
// 'globalTypedQuerySelector.enable': boolean,
/**
* For DX in JS projects only!
* @default true
*/
// 'wrapDefaultExports.enable': boolean,
// 'wrapDefaultExports.map': {[relativePathGlob: string]: [string, string]},
// 'specialGlobalTypes'
// AS SEPARATE!
// TODO
/** Diagnostics (if not handled by eslint) & completions */
// 'dotImportsMap.enable': boolean,
/**
* One of the most powerful setting here. It lets you remove/edit (patch) any completions that comes from TS. However it's experimental and can conflict with our completion changes (rare).
* **Please** try to always specify kind (e.g. variable) of the suggestion to ensure you don't remove word-suggestion
* @default []
*/
replaceSuggestions: ReplaceRule[]
/**
* https://github.com/microsoft/vscode/issues/160637
* @default true
*/
removeDefinitionFromReferences: boolean
/**
* Make tsserver think signature help never gets triggered manually to make it not go outside of block eg:
* ```ts
* declare const a: (a) => void
* a(() => {/* no annoying signature help on trigger *\/ })
* ```
* But it still allow it to be displayed in return statements which is more convenient
* @recommended
* @default false
*/
'signatureHelp.excludeBlockScope': boolean
/**
* @default true
*/
removeImportsFromReferences: boolean
/**
* Small definition improvements by cleaning them out:
* - remove node_modules type definition on React.FC components (e.g. <Foo />)
* - remove classes index definition on css modules (https://github.com/clinyong/vscode-css-modules/issues/63#issuecomment-1372851831)
* @default true
*/
miscDefinitionImprovement: boolean
// todo change setting format to: vue.*
/**
* Removes definition suggestion from vue `components` options.
* Might be useful with [Vetur-extended goToDefinition](https://github.com/zardoy/vetur-extended/blob/main/src/gotoDefinition.ts) for components as a replacement for (https://github.com/vuejs/language-tools/issues/1245)
* @default false
*/
removeVueComponentsOptionDefinition: boolean
/**
* Use `filter-all` to also exclude auto-import completions (useful for Nuxt projects)
* @recommended filter-non-vue
* @default disable
*/
cleanupVueComponentCompletions: 'disable' | 'filter-non-vue' | 'filter-all'
/**
* Experimental, feedback welcome
* If default, namespace import or import path click resolves to .d.ts file, try to resolve .js file instead with the same name
* @default false
*/
changeDtsFileDefinitionToJs: boolean
/**
* Wether to enable method call snippets after completion (suggestion) accept eg:
* ```ts
* const simple = (foo: boolean) => {}
* const complex = ({ a }, b?, c = 5) => { }
*
* simple(foo)
* test({ a }, b, c)
* ```
* @default true
*/
enableMethodSnippets: boolean
/**
* Wether add insert text and detail to every function completion on each suggest trigger (instead of expanding method snippet after completion accept).
* This way you can enable support for method snippets in Vue files.
* `methodSnippets.replaceArguments` isn't supported for now.
* This is not enabled by default as it might be really slow in some cases.
* Recommended to try!
* @default disable
*/
'methodSnippets.previewSignature': 'disable' | 'only-local' | 'all'
/**
* ```ts
* const example = ({ a }, b?, c = 5, ...d) => { }
*
* // binding-name (default)
* example({ a }, b, c, ...d)
* // always-declaration (also popular)
* example({ a }, b?, c = 5, ...d)
* // always-name
* example(__0, b, c, d)
* ```
* @default binding-name
*/
'methodSnippets.insertText': 'binding-name' | 'always-declaration' | 'always-name'
/**
* ```ts
* const example = ({ a }, b?, c = 5, ...d) => { }
*
* // only-rest
* example({ a }, b, c)
* // optional-and-rest (default)
* example({ a })
* // all
* example() // (cursor inside)
* // no-skip (popular)
* example({ a }, b, c, ...d)
* ```
* @default optional-and-rest
*/
'methodSnippets.skip': 'only-rest' | 'optional-and-rest' | 'all' | 'no-skip'
/**
* @default pick-first
*/
'methodSnippets.multipleSignatures': 'pick-first' | 'empty' /* DON'T SEE A NEED TO IMPLEMENT: | 'pick-longest' | 'pick-shortest' */
/**
* Use empty string for tabstop, `null` to remove argument
* In replace string use `$` to insert tabstop and `\$` to insert `$`
*
* Examples:
* ```json
* "listener": "() => $",
* "eventName": "'$'"
* "thisArg": null
* ```
* @default {}
*/
'methodSnippets.replaceArguments': {
[argumentName: string]: string | null
}
/**
* Wether to disable our and builtin method snippets within jsx attributes
* @default true
*/
'disableMethodSnippets.jsxAttributes': boolean
/**
* Wether to disable method snippets in function arguments
* @default false
*/
'disableMethodSnippets.functionArguments': boolean
/**
* Support `@ts-diagnostic-disable` top-level comment for disabling specific semantic diagnostics
* Example: `// @ts-diagnostic-disable
* Advanced usage only! Enable in `.vscode/settings.json` for projects that need this
* Since its changes only IDE experience, but not tsc
* @default false
*/
supportTsDiagnosticDisableComment: boolean
/**
* Adds special helpers completions in `{}`
* For example when you're trying to complete object props in array
* @default true
*/
// completionHelpers: boolean
/**
* Extend TypeScript outline with:
* - JSX Elements
* - Type Alias Declarations
* Should be stable!
* @recommended
* @default false
*/
patchOutline: boolean
/**
* Recommended to enable if you use `patchOutline`
* @default false
*/
'outline.arraysTuplesNumberedItems': boolean
/**
* Exclude covered strings/enum cases in switch in completions
* @deprecated Will be removed in next release
* @default true
*/
switchExcludeCoveredCases: boolean
/**
* Make completions case-sensitive (see https://github.com/microsoft/TypeScript/issues/46622)
* Might be enabled by default in future. Experimental as for now compares only start of completions.
* Might require completion retrigger if was triggered by not quick suggestions.
* @default false
*/
caseSensitiveCompletions: boolean
/**
* Might be useful to enable for a moment. Note, that you can bind shortcuts within VSCode to quickly toggle settings like this
* Also experimental and wasn't tested in all cases
* Like described in `caseSensitiveCompletions` might require completion retrigger
* @default false
*/
disableFuzzyCompletions: boolean
/**
* Disable useless highlighting,
* @default disable
*/
// todo fix spelling
disableUselessHighlighting: 'disable' | 'inJsxArttributeStrings' | 'inAllStrings'
/**
* Improve JSX attribute completions:
* - enable builtin jsx attribute completion fix
* - enable jsxCompletionsMap
* @default true
*/
improveJsxCompletions: boolean
/**
* Replace JSX completions by map with `tagName#attribute` pattern as keys
* `tagName` can be omitted, but not `attribute` for now
* Example usages:
* - `#className`: `insertText: "={classNames$1}"`
* - `button#type`: `insertText: "='button'"`
* - `#on*`: `insertText: "={${1:($2) => $3}}"`
* - `Table#someProp`: `insertText: "="something"`
* Remove attribute:
* - `children`: `false`
* @default {}
*/
jsxCompletionsMap: {
[rule: string]:
| {
insertText: string
// TODO make it accept 'above'?
/**
* Make original suggestion keep below (true) or above patched
*/
keepOriginal?: true | 'above'
}
| false
}
/**
* The integration is enabled, only when this array is not empty
* Integration supports only string within function call
* Examples: `cp.exec(`, `executeShellCommand(`
* @uniqueItems
* @default []
*/
'figIntegration.enableWhenStartsWith': string[]
/**
* Propose additional completions in object. Just like `typescript.suggest.objectLiteralMethodSnippets.enabled`, but also for strings, arrays and objects
* @default true
*/
'objectLiteralCompletions.moreVariants': boolean
/**
* When `moreVariants` is enabled, always add fallback variant (`: `) if other variant can't be derived
* @default false
*/
'objectLiteralCompletions.fallbackVariant': boolean
/**
* For `objectLiteralCompletions.moreVariants`, wether to insert newline for objects / arrays
* @default true
*/
'objectLiteralCompletions.insertNewLine': boolean
/**
* For `objectLiteralCompletions.moreVariants`
* @default displayBelow
*/
// 'objectLiteralCompletions.deepVariants': 'disable' | 'displayBelow' | 'replaceNotDeep'
/**
* How to position original suggestion relative to snippet suggestion.
* Also affects builtin typescript.suggest.objectLiteralMethodSnippets, even when additional plugin completions disabled
* @default before
*/
'objectLiteralCompletions.keepOriginal': 'before' | 'after' | 'remove'
/**
* Add shortcut completions like `className` -> `class={className}` if there is the variable with the same name in scope available
* - after - display shortcut after original suggestion
* - before - display shortcut before original suggestion
* @default after
*/
'jsxAttributeShortcutCompletions.enable': 'disable' | 'before' | 'after'
/**
* Wether to exclude non-JSX components completions in JSX component locations
* Requires TypeScript 5.0+
* @default false
*/
'experiments.excludeNonJsxCompletions': boolean
/**
* Wether to change function completions to function kind
* @deprecated Use `methodSnippets.previewSignature` instead
* @default false
*/
'experiments.changeKindToFunction': boolean
/**
* Use workaround method for inserting name of TypeScript suggestion.
* If you move to next suggestion and then to previous, and then run *insert name of completion* via keybinding, name of **last resolved** completion will be inserted, so you might prefer to enable this setting. Also it makes this feature work in Vue.
* @default false
*/
'experiments.enableInsertNameOfSuggestionFix': boolean
/**
* Speed up JSX linked editing by not using actual tsserver command when possible, which in theory may introduce some inconsistencies.
* Note that currently it doesn't really help if you have `"typescript.tsserver.useSyntaxServer": "auto"` in the settings.
* @default true
*/
'experiments.speedLinkedEditing': boolean
/**
* Map *symbol - array of modules* to change sorting of imports - first available takes precedence in auto import code fixes (+ import all action)
*
* Examples:
* - `join`: ['path/posix'] // other suggestions will be below
* - `resolve`: ['*', 'path/posix'] // make `path/posix` appear below any other suggestions
* - `useEventListener`: ['.'] // `.` (dot) is reserved for local suggestions, which makes them appear above other
* @default {}
*/
'autoImport.changeSorting': { [pathAndOrSymbol: string]: string[] }
/**
* Advanced. Use `suggestions.ignoreAutoImports` setting if possible.
*
* Specify packages to ignore in *add all missing imports* fix, to ensure these packages never get imported automatically.
*
* TODO syntaxes /* and module#symbol unsupported (easy)
* @default []
*/
'autoImport.alwaysIgnoreInImportAll': string[]
/**
* Specify here modules should be imported as namespace import. But note that imports gets processed first by `suggestions.ignoreAutoImports` anyway.
*
* @default {}
*/
'autoImport.changeToNamespaceImport': {
[module: string]: {
/**
* Defaults to key
*/
namespace?: string
/**
* @default false
*/
useDefaultImport?: boolean
/**
* Set to `false` if the module is accessible from the global variable
* For now not supported in add all missing imports code action
* @default true */
addImport?: boolean
}
}
/**
* Enable to display additional information about source declaration in completion's documentation
* For now only displays function's body
* Requires TypeScript 5.0+
* @default false
*/
displayAdditionalInfoInCompletions: boolean
/**
* Wether to try to infer name for extract type / interface code action
* e.g. `let foo: { a: number }` -> `type Foo = { a: number }`
* @default true
*/
'codeActions.extractTypeInferName': boolean
/**
* Use `{{name}}` as a placeholder to insert inferred name (possibly with _{i} at the end)
*
* @default "{{name}}"
*/
'codeActions.extractTypeInferNamePattern':
| string
| {
typeAlias: string
interface: string
}
/**
* @default {}
*/
customizeEnabledFeatures: {
[path: string]:
| 'disable-auto-invoked'
// | 'disable-heavy-features'
| {
/** @default true */
[feature in keyof LanguageService]: boolean
}
}
// bigFilesLimitFeatures: 'do-not-limit' | 'limit-auto-invoking' | 'force-limit-all-features'
/**
* in kb default is 1.5mb
* @default 100000
*/
// bigFilesThreshold: number
/** @default false */
enableHooksFile: boolean
/**
* @default false
*/
declareMissingPropertyQuickfixOtherFiles: boolean
/**
* @recommended {".svg": {
* "importPath": "$path?react",
* "prefix": "Svg",
* "nameCasing": "pascal"
* },
* @default {}
*/
filesAutoImport: {
[ext: string]: {
/**
* Override import path (default is "$path")
*/
importPath?: string
/**
* Start phrase that will trigger search for available files import
*/
prefix: string
/**
* @default camel
*/
nameCasing?: 'camel' | 'pascal' | 'constant' | 'snake'
/**
* @default $name
*/
nameTransform?: string
iconPost?: string
}
}
/**
* @default true
*/
'completionsAutoTrigger.jsx': boolean
/**
* @default false
*/
'inlayHints.missingJsxAttributes.enabled': boolean
}
// scrapped using search editor. config: caseInsensitive, context lines: 0, regex: const fix\w+ = "[^ ]+"
type FixId =
| 'fixAllInFileSourceAction'
| 'addConvertToUnknownForNonOverlappingTypes'
| 'addMissingAsync'
| 'addMissingAwait'
| 'addMissingConst'
| 'addMissingDeclareProperty'
| 'addMissingInvocationForDecorator'
| 'addNameToNamelessParameter'
| 'annotateWithTypeFromJSDoc'
| 'fixConvertConstToLet'
| 'convertFunctionToEs6Class'
| 'convertLiteralTypeToMappedType'
| 'convertToAsyncFunction'
| 'fixConvertToMappedObjectType'
| 'convertToTypeOnlyExport'
| 'convertToTypeOnlyImport'
| 'correctQualifiedNameToIndexedAccessType'
| 'disableJsDiagnostics'
| 'disableJsDiagnostics'
| 'addMissingConstraint'
| 'fixMissingMember'
| 'fixMissingProperties'
| 'fixMissingAttributes'
| 'fixMissingFunctionDeclaration'
| 'addMissingNewOperator'
| 'fixAddModuleReferTypeMissingTypeof'
| 'addVoidToPromise'
| 'addVoidToPromise'
| 'fixAwaitInSyncFunction'
| 'fixCannotFindModule'
| 'installTypesPackage'
| 'fixClassDoesntImplementInheritedAbstractMember'
| 'fixClassIncorrectlyImplementsInterface'
| 'classSuperMustPrecedeThisAccess'
| 'constructorForDerivedNeedSuperCall'
| 'enableExperimentalDecorators'
| 'fixEnableJsxFlag'
| 'fixExpectedComma'
| 'extendsInterfaceBecomesImplements'
| 'forgottenThisPropertyAccess'
| 'fixImplicitThis'
| 'fixImportNonExportedMember'
| 'fixIncorrectNamedTupleSyntax'
| 'invalidImportSyntax'
| 'fixInvalidJsxCharacters_expression'
| 'fixInvalidJsxCharacters_htmlEntity'
| 'fixJSDocTypes_plain'
| 'fixJSDocTypes_nullable'
| 'fixMissingCallParentheses'
| 'fixNaNEquality'
| 'fixNoPropertyAccessFromIndexSignature'
| 'fixOverrideModifier'
| 'fixAddOverrideModifier'
| 'fixRemoveOverrideModifier'
| 'fixPropertyAssignment'
| 'fixPropertyOverrideAccessor'
| 'fixReturnTypeInAsyncFunction'
| 'fixSpelling'
| 'strictClassInitialization'
| 'addMissingPropertyDefiniteAssignmentAssertions'
| 'addMissingPropertyUndefinedType'
| 'addMissingPropertyInitializer'
| 'fixUnreachableCode'
| 'fixUnreferenceableDecoratorMetadata'
| 'unusedIdentifier'
| 'unusedIdentifier_prefix'
| 'unusedIdentifier_delete'
| 'unusedIdentifier_deleteImports'
| 'unusedIdentifier_infer'
| 'fixUnusedLabel'
| 'inferFromUsage'
| 'removeAccidentalCallParentheses'
| 'removeUnnecessaryAwait'
| 'requireInTs'
| 'returnValueCorrect'
| 'fixAddReturnStatement'
| 'fixRemoveBracesFromArrowFunctionBody'
| 'fixWrapTheBlockWithParen'
| 'splitTypeOnlyImport'
| 'useBigintLiteral'
| 'useDefaultImport'
| 'wrapJsxInFragment'