@cspell/cspell-types 10.0.1 → 10.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,106 +1,105 @@
1
- import { a as Parser, d as Range, f as SourceMap, i as ParsedText, o as ParserName, r as ParseResult, s as ParserOptions, t as MappedText } from "./index-ufqGDeKQ.mjs";
2
-
1
+ import { a as Parser, d as Range, f as SourceMap, i as ParsedText, o as ParserName, r as ParseResult, s as ParserOptions, t as MappedText } from "./index-BXiGhX2J.mjs";
3
2
  //#region src/cspell-vfs.d.ts
4
3
  /**
5
- * Binary data for CSpellVFS file.
6
- * This can be exported by a JavaScript based CSpell Configuration file.
7
- * @hidden
8
- */
4
+ * Binary data for CSpellVFS file.
5
+ * This can be exported by a JavaScript based CSpell Configuration file.
6
+ * @hidden
7
+ */
9
8
  type CSpellVFSBinaryData = Uint8Array<ArrayBuffer>;
10
9
  /**
11
- * Data content stored in a string for CSpellVFS file.
12
- * It is often encoded (e.g. base64) binary data.
13
- */
10
+ * Data content stored in a string for CSpellVFS file.
11
+ * It is often encoded (e.g. base64) binary data.
12
+ */
14
13
  type CSpellVFSTextData = string;
15
14
  /**
16
- * The data content of a CSpellVFS file.
17
- */
15
+ * The data content of a CSpellVFS file.
16
+ */
18
17
  type CSpellVFSData = CSpellVFSBinaryData | CSpellVFSTextData;
19
18
  /**
20
- * An entry in the CSpell Virtual File System.
21
- * It may or may not have a URL.
22
- * @since 9.7.0
23
- */
19
+ * An entry in the CSpell Virtual File System.
20
+ * It may or may not have a URL.
21
+ * @since 9.7.0
22
+ */
24
23
  interface CSpellVFSFileEntry {
25
24
  /**
26
- * The optional file vfs url. It is already part of the CSpellVFS key.
27
- */
25
+ * The optional file vfs url. It is already part of the CSpellVFS key.
26
+ */
28
27
  url?: CSpellVFSFileUrl;
29
28
  /**
30
- * The content data of the file.
31
- */
29
+ * The content data of the file.
30
+ */
32
31
  data: CSpellVFSData;
33
32
  /**
34
- * The encoding of the data. In most cases the encoding is determined from the data type and filename url.
35
- */
33
+ * The encoding of the data. In most cases the encoding is determined from the data type and filename url.
34
+ */
36
35
  encoding?: "base64" | "plaintext" | "utf8";
37
36
  }
38
37
  interface CSpellVFSFile extends CSpellVFSFileEntry {
39
38
  /**
40
- * The file URL.
41
- */
39
+ * The file URL.
40
+ */
42
41
  url: CSpellVFSFileUrl;
43
42
  }
44
43
  /**
45
- * A URL string representing a CSpellVFS file.
46
- * It should be of the form:
47
- *
48
- * ```txt
49
- * cspell-vfs:///<module>/<path-to-file>/<file-name>
50
- * ```
51
- *
52
- * Example: `cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz`
53
- *
54
- * @since 9.7.0
55
- */
44
+ * A URL string representing a CSpellVFS file.
45
+ * It should be of the form:
46
+ *
47
+ * ```txt
48
+ * cspell-vfs:///<module>/<path-to-file>/<file-name>
49
+ * ```
50
+ *
51
+ * Example: `cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz`
52
+ *
53
+ * @since 9.7.0
54
+ */
56
55
  type CSpellVFSFileUrl = string;
57
56
  /**
58
- * A declaration of files to add to the CSpell Virtual File System.
59
- * @since 9.7.0
60
- * @stability experimental
61
- */
57
+ * A declaration of files to add to the CSpell Virtual File System.
58
+ * @since 9.7.0
59
+ * @stability experimental
60
+ */
62
61
  type CSpellVFS = Record<CSpellVFSFileUrl, CSpellVFSFileEntry>;
63
62
  //#endregion
64
63
  //#region src/SuggestionsConfiguration.d.ts
65
64
  interface SuggestionsConfiguration {
66
65
  /**
67
- * Number of suggestions to make.
68
- *
69
- * @default 10
70
- */
66
+ * Number of suggestions to make.
67
+ *
68
+ * @default 10
69
+ */
71
70
  numSuggestions?: number;
72
71
  /**
73
- * The maximum amount of time in milliseconds to generate suggestions for a word.
74
- *
75
- * @default 500
76
- */
72
+ * The maximum amount of time in milliseconds to generate suggestions for a word.
73
+ *
74
+ * @default 500
75
+ */
77
76
  suggestionsTimeout?: number;
78
77
  /**
79
- * The maximum number of changes allowed on a word to be considered a suggestions.
80
- *
81
- * For example, appending an `s` onto `example` -> `examples` is considered 1 change.
82
- *
83
- * Range: between 1 and 5.
84
- *
85
- * @default 3
86
- */
78
+ * The maximum number of changes allowed on a word to be considered a suggestions.
79
+ *
80
+ * For example, appending an `s` onto `example` -> `examples` is considered 1 change.
81
+ *
82
+ * Range: between 1 and 5.
83
+ *
84
+ * @default 3
85
+ */
87
86
  suggestionNumChanges?: number;
88
87
  }
89
88
  //#endregion
90
89
  //#region src/TextOffset.d.ts
91
90
  interface TextOffset {
92
91
  /**
93
- * The text found at the offset. If the text has been transformed, then the length might not match `length`.
94
- * Example: Original: `cafe\u0301`, text: `café`
95
- */
92
+ * The text found at the offset. If the text has been transformed, then the length might not match `length`.
93
+ * Example: Original: `cafe\u0301`, text: `café`
94
+ */
96
95
  text: string;
97
96
  /**
98
- * The offset into the document.
99
- */
97
+ * The offset into the document.
98
+ */
100
99
  offset: number;
101
100
  /**
102
- * Assumed to match `text.length` if the text has not been transformed.
103
- */
101
+ * Assumed to match `text.length` if the text has not been transformed.
102
+ */
104
103
  length?: number | undefined;
105
104
  }
106
105
  interface TextDocumentOffset extends TextOffset {
@@ -114,57 +113,57 @@ interface TextDocumentOffset extends TextOffset {
114
113
  //#region src/CSpellReporter.d.ts
115
114
  interface Suggestion {
116
115
  /**
117
- * Word to suggest.
118
- */
116
+ * Word to suggest.
117
+ */
119
118
  word: string;
120
119
  /**
121
- * The suggested word adjusted to match the original case.
122
- */
120
+ * The suggested word adjusted to match the original case.
121
+ */
123
122
  wordAdjustedToMatchCase?: string;
124
123
  /**
125
- * `true` - if this suggestion can be an automatic fix.
126
- */
124
+ * `true` - if this suggestion can be an automatic fix.
125
+ */
127
126
  isPreferred?: boolean;
128
127
  }
129
128
  interface Issue extends Omit<TextDocumentOffset, "doc"> {
130
129
  /**
131
- * The text surrounding the issue text. It is only included if the reporter cannot generated it automatically.
132
- */
130
+ * The text surrounding the issue text. It is only included if the reporter cannot generated it automatically.
131
+ */
133
132
  context?: TextOffset | undefined;
134
133
  /**
135
- * true if the issue has been flagged as a forbidden word.
136
- */
134
+ * true if the issue has been flagged as a forbidden word.
135
+ */
137
136
  isFlagged?: boolean | undefined;
138
137
  /**
139
- * An optional array of replacement strings.
140
- */
138
+ * An optional array of replacement strings.
139
+ */
141
140
  suggestions?: string[] | undefined;
142
141
  /**
143
- * An optional array of suggestions.
144
- */
142
+ * An optional array of suggestions.
143
+ */
145
144
  suggestionsEx?: Suggestion[] | undefined;
146
145
  /**
147
- * Issues are spelling issues unless otherwise specified.
148
- */
146
+ * Issues are spelling issues unless otherwise specified.
147
+ */
149
148
  issueType?: IssueType | undefined;
150
149
  /**
151
- * Optional message to show.
152
- */
150
+ * Optional message to show.
151
+ */
153
152
  message?: string | undefined;
154
153
  /**
155
- * `true` - if it has been determined if simple suggestions are available.
156
- * `false` - if simple suggestions are NOT available.
157
- * `undefined` - if it has not been determined.
158
- * @since 9.1.0
159
- */
154
+ * `true` - if it has been determined if simple suggestions are available.
155
+ * `false` - if simple suggestions are NOT available.
156
+ * `undefined` - if it has not been determined.
157
+ * @since 9.1.0
158
+ */
160
159
  hasSimpleSuggestions?: boolean | undefined;
161
160
  /**
162
- * This setting is used for common typo detection.
163
- * - `true` - if it has been determined if preferred suggestions are available.
164
- * - `false` - if preferred suggestions are NOT available.
165
- * - `undefined` - if it has not been determined.
166
- * @since 9.1.0
167
- */
161
+ * This setting is used for common typo detection.
162
+ * - `true` - if it has been determined if preferred suggestions are available.
163
+ * - `false` - if preferred suggestions are NOT available.
164
+ * - `undefined` - if it has not been determined.
165
+ * @since 9.1.0
166
+ */
168
167
  hasPreferredSuggestions?: boolean | undefined;
169
168
  }
170
169
  declare enum IssueType {
@@ -172,7 +171,7 @@ declare enum IssueType {
172
171
  directive = 1
173
172
  }
174
173
  type MessageType = "Debug" | "Info" | "Warning";
175
- type MessageTypeLookup = { [key in MessageType]: key };
174
+ type MessageTypeLookup = { [key in MessageType]: key; };
176
175
  declare const MessageTypes: MessageTypeLookup;
177
176
  type MessageEmitter = (message: string, msgType: MessageType) => void;
178
177
  type DebugEmitter = (message: string) => void;
@@ -191,55 +190,55 @@ interface ProgressBase {
191
190
  interface ProgressFileBase extends ProgressBase {
192
191
  type: ProgressTypes;
193
192
  /**
194
- * The sequence number of the file being processed.
195
- */
193
+ * The sequence number of the file being processed.
194
+ */
196
195
  fileNum: number;
197
196
  /**
198
- * The total number of files being processed.
199
- */
197
+ * The total number of files being processed.
198
+ */
200
199
  fileCount: number;
201
200
  /**
202
- * The file name or href of file being processed.
203
- */
201
+ * The file name or href of file being processed.
202
+ */
204
203
  filename: string;
205
204
  }
206
205
  interface ProgressFileComplete extends ProgressFileBase {
207
206
  type: "ProgressFileComplete";
208
207
  /**
209
- * The time it took to process the file in milliseconds.
210
- * If `undefined`, then the elapsed time is not available.
211
- */
208
+ * The time it took to process the file in milliseconds.
209
+ * If `undefined`, then the elapsed time is not available.
210
+ */
212
211
  elapsedTimeMs: number | undefined;
213
212
  /**
214
- * `true` if the file was processed.
215
- * `false` if the file was skipped.
216
- */
213
+ * `true` if the file was processed.
214
+ * `false` if the file was skipped.
215
+ */
217
216
  processed: boolean | undefined;
218
217
  /**
219
- * Optional reason for skipping the file.
220
- */
218
+ * Optional reason for skipping the file.
219
+ */
221
220
  skippedReason?: string | undefined;
222
221
  /**
223
- * Number of errors and issues found in the file.
224
- */
222
+ * Number of errors and issues found in the file.
223
+ */
225
224
  numErrors: number | undefined;
226
225
  /**
227
- * `true` if the file was processed from the cache.
228
- */
226
+ * `true` if the file was processed from the cache.
227
+ */
229
228
  cached?: boolean;
230
229
  /**
231
- * Issues found in the file.
232
- * If `undefined`, then the issues are not available.
233
- */
230
+ * Issues found in the file.
231
+ * If `undefined`, then the issues are not available.
232
+ */
234
233
  issues?: Iterable<Issue> | undefined;
235
234
  /**
236
- * reportIssuesOptions to be used when reporting issues.
237
- */
235
+ * reportIssuesOptions to be used when reporting issues.
236
+ */
238
237
  reportIssueOptions?: ReportIssueOptions | undefined;
239
238
  }
240
239
  /**
241
- * Notification sent just before processing a file.
242
- */
240
+ * Notification sent just before processing a file.
241
+ */
243
242
  interface ProgressFileBegin extends ProgressFileBase {
244
243
  type: "ProgressFileBegin";
245
244
  }
@@ -269,67 +268,67 @@ interface CSpellReporterEmitters {
269
268
  }
270
269
  interface CSpellReporter extends CSpellReporterEmitters {
271
270
  /**
272
- * Allows the reporter to specify supported features.
273
- * @since 9.1.0
274
- */
271
+ * Allows the reporter to specify supported features.
272
+ * @since 9.1.0
273
+ */
275
274
  features?: FeaturesSupportedByReporter | undefined;
276
275
  }
277
276
  interface ReporterConfigurationBase {
278
277
  /**
279
- * The maximum number of problems to report in a file.
280
- *
281
- * @default 10000
282
- */
278
+ * The maximum number of problems to report in a file.
279
+ *
280
+ * @default 10000
281
+ */
283
282
  maxNumberOfProblems?: number;
284
283
  /**
285
- * The maximum number of times the same word can be flagged as an error in a file.
286
- *
287
- * @default 5
288
- */
284
+ * The maximum number of times the same word can be flagged as an error in a file.
285
+ *
286
+ * @default 5
287
+ */
289
288
  maxDuplicateProblems?: number;
290
289
  /**
291
- * The minimum length of a word before checking it against a dictionary.
292
- *
293
- * @default 4
294
- */
290
+ * The minimum length of a word before checking it against a dictionary.
291
+ *
292
+ * @default 4
293
+ */
295
294
  minWordLength?: number;
296
295
  /**
297
- * Ignore sequences of characters that look like random strings.
298
- *
299
- * @default true
300
- */
296
+ * Ignore sequences of characters that look like random strings.
297
+ *
298
+ * @default true
299
+ */
301
300
  ignoreRandomStrings?: boolean | undefined;
302
301
  /**
303
- * The minimum length of a random string to be ignored.
304
- *
305
- * @default 40
306
- */
302
+ * The minimum length of a random string to be ignored.
303
+ *
304
+ * @default 40
305
+ */
307
306
  minRandomLength?: number | undefined;
308
307
  }
309
308
  interface ReporterCommandLineOptions {
310
309
  /**
311
- * Display verbose information
312
- */
310
+ * Display verbose information
311
+ */
313
312
  verbose?: boolean;
314
313
  /**
315
- * Level of verbosity (higher number = more verbose).
316
- */
314
+ * Level of verbosity (higher number = more verbose).
315
+ */
317
316
  verboseLevel?: number;
318
317
  /**
319
- * Show extensive output.
320
- */
318
+ * Show extensive output.
319
+ */
321
320
  debug?: boolean;
322
321
  /**
323
- * Only report the words, no line numbers or file names.
324
- */
322
+ * Only report the words, no line numbers or file names.
323
+ */
325
324
  wordsOnly?: boolean;
326
325
  /**
327
- * unique errors per file only.
328
- */
326
+ * unique errors per file only.
327
+ */
329
328
  unique?: boolean;
330
329
  /**
331
- * root directory, defaults to `cwd`
332
- */
330
+ * root directory, defaults to `cwd`
331
+ */
333
332
  root?: string;
334
333
  }
335
334
  interface ReporterConfiguration extends ReporterCommandLineOptions, ReporterConfigurationBase {}
@@ -337,44 +336,44 @@ interface CSpellReporterModule {
337
336
  getReporter: (settings: unknown, config: ReporterConfiguration) => CSpellReporter;
338
337
  }
339
338
  /**
340
- * Allows the reporter to advertise which features it supports.
341
- */
339
+ * Allows the reporter to advertise which features it supports.
340
+ */
342
341
  interface FeaturesSupportedByReporter {
343
342
  /**
344
- * The reporter supports the {@link ReportingConfiguration.unknownWords} option and understands
345
- * how to filter issues based upon {@link Issue.isFlagged}, {@link Issue.hasSimpleSuggestions} and {@link Issue.hasPreferredSuggestions}.
346
- * - `true` - The `reporter.issue` method will be called for all spelling issues and it is expected to handle .
347
- * - `false | undefined` - the unknown words will be filtered out based upon the `unknownWords` setting before being passed to the reporter.
348
- */
343
+ * The reporter supports the {@link ReportingConfiguration.unknownWords} option and understands
344
+ * how to filter issues based upon {@link Issue.isFlagged}, {@link Issue.hasSimpleSuggestions} and {@link Issue.hasPreferredSuggestions}.
345
+ * - `true` - The `reporter.issue` method will be called for all spelling issues and it is expected to handle .
346
+ * - `false | undefined` - the unknown words will be filtered out based upon the `unknownWords` setting before being passed to the reporter.
347
+ */
349
348
  unknownWords?: boolean | undefined;
350
349
  /**
351
- * The reporter supports the {@link Issue.issueType} option.
352
- * - `true` - the reporter will be called with all issues types.
353
- * - `false | undefined` - only {@link IssueType.spelling} issues will be passed to the reporter.
354
- */
350
+ * The reporter supports the {@link Issue.issueType} option.
351
+ * - `true` - the reporter will be called with all issues types.
352
+ * - `false | undefined` - only {@link IssueType.spelling} issues will be passed to the reporter.
353
+ */
355
354
  issueType?: boolean | undefined;
356
355
  /**
357
- * The reporter can generate context for issues.
358
- * - `true` - the reporter will be called with issues that do NOT have a `context` property.
359
- * - `false | undefined` - the reporter will be called with issues that have a `context` property.
360
- */
356
+ * The reporter can generate context for issues.
357
+ * - `true` - the reporter will be called with issues that do NOT have a `context` property.
358
+ * - `false | undefined` - the reporter will be called with issues that have a `context` property.
359
+ */
361
360
  contextGeneration?: boolean | undefined;
362
361
  }
363
362
  interface ReportingConfiguration extends ReporterConfigurationBase, SuggestionsConfiguration, UnknownWordsConfiguration {}
364
363
  interface ReportIssueOptions extends UnknownWordsConfiguration {
365
364
  /**
366
- * Verify that the in-document directives are correct.
367
- */
365
+ * Verify that the in-document directives are correct.
366
+ */
368
367
  validateDirectives?: boolean | undefined;
369
368
  /**
370
- * Tells the spell checker to show context around the issue.
371
- * It is the number of characters to show on either side of the issue.
372
- */
369
+ * Tells the spell checker to show context around the issue.
370
+ * It is the number of characters to show on either side of the issue.
371
+ */
373
372
  showContext?: number | undefined;
374
373
  }
375
374
  /**
376
- * Possible choices for how to handle unknown words.
377
- */
375
+ * Possible choices for how to handle unknown words.
376
+ */
378
377
  type UnknownWordsChoices = "report-all" | "report-simple" | "report-common-typos" | "report-flagged";
379
378
  declare const unknownWordsChoices: {
380
379
  readonly ReportAll: "report-all";
@@ -384,95 +383,95 @@ declare const unknownWordsChoices: {
384
383
  };
385
384
  interface UnknownWordsConfiguration {
386
385
  /**
387
- * Controls how unknown words are handled.
388
- *
389
- * - `report-all` - Report all unknown words (default behavior)
390
- * - `report-simple` - Report unknown words that have simple spelling errors, typos, and flagged words.
391
- * - `report-common-typos` - Report unknown words that are common typos and flagged words.
392
- * - `report-flagged` - Report unknown words that are flagged.
393
- *
394
- * @default "report-all"
395
- * @since 9.1.0
396
- */
386
+ * Controls how unknown words are handled.
387
+ *
388
+ * - `report-all` - Report all unknown words (default behavior)
389
+ * - `report-simple` - Report unknown words that have simple spelling errors, typos, and flagged words.
390
+ * - `report-common-typos` - Report unknown words that are common typos and flagged words.
391
+ * - `report-flagged` - Report unknown words that are flagged.
392
+ *
393
+ * @default "report-all"
394
+ * @since 9.1.0
395
+ */
397
396
  unknownWords?: UnknownWordsChoices | undefined;
398
397
  }
399
398
  //#endregion
400
399
  //#region src/suggestionCostsDef.d.ts
401
400
  /**
402
- * A WeightedMapDef enables setting weights for edits between related characters and substrings.
403
- *
404
- * Multiple groups can be defined using a `|`.
405
- * A multi-character substring is defined using `()`.
406
- *
407
- * For example, in some languages, some letters sound alike.
408
- *
409
- * ```yaml
410
- * map: 'sc(sh)(sch)(ss)|t(tt)' # two groups.
411
- * replace: 50 # Make it 1/2 the cost of a normal edit to replace a `t` with `tt`.
412
- * ```
413
- *
414
- * The following could be used to make inserting, removing, or replacing vowels cheaper.
415
- * ```yaml
416
- * map: 'aeiouy'
417
- * insDel: 50 # Make it is cheaper to insert or delete a vowel.
418
- * replace: 45 # It is even cheaper to replace one with another.
419
- * ```
420
- *
421
- * Note: the default edit distance is 100.
422
- */
401
+ * A WeightedMapDef enables setting weights for edits between related characters and substrings.
402
+ *
403
+ * Multiple groups can be defined using a `|`.
404
+ * A multi-character substring is defined using `()`.
405
+ *
406
+ * For example, in some languages, some letters sound alike.
407
+ *
408
+ * ```yaml
409
+ * map: 'sc(sh)(sch)(ss)|t(tt)' # two groups.
410
+ * replace: 50 # Make it 1/2 the cost of a normal edit to replace a `t` with `tt`.
411
+ * ```
412
+ *
413
+ * The following could be used to make inserting, removing, or replacing vowels cheaper.
414
+ * ```yaml
415
+ * map: 'aeiouy'
416
+ * insDel: 50 # Make it is cheaper to insert or delete a vowel.
417
+ * replace: 45 # It is even cheaper to replace one with another.
418
+ * ```
419
+ *
420
+ * Note: the default edit distance is 100.
421
+ */
423
422
  type SuggestionCostMapDef = CostMapDefReplace | CostMapDefInsDel | CostMapDefSwap;
424
423
  type SuggestionCostsDefs = SuggestionCostMapDef[];
425
424
  interface CostMapDefBase {
426
425
  /**
427
- * The set of substrings to map, these are generally single character strings.
428
- *
429
- * Multiple sets can be defined by using a `|` to separate them.
430
- *
431
- * Example: `"eéê|aåá"` contains two different sets.
432
- *
433
- * To add a multi-character substring use `()`.
434
- *
435
- * Example: `"f(ph)(gh)"` results in the following set: `f`, `ph`, `gh`.
436
- *
437
- * - To match the beginning of a word, use `^`: `"(^I)""`.
438
- * - To match the end of a word, use `$`: `"(e$)(ing$)"`.
439
- *
440
- */
426
+ * The set of substrings to map, these are generally single character strings.
427
+ *
428
+ * Multiple sets can be defined by using a `|` to separate them.
429
+ *
430
+ * Example: `"eéê|aåá"` contains two different sets.
431
+ *
432
+ * To add a multi-character substring use `()`.
433
+ *
434
+ * Example: `"f(ph)(gh)"` results in the following set: `f`, `ph`, `gh`.
435
+ *
436
+ * - To match the beginning of a word, use `^`: `"(^I)""`.
437
+ * - To match the end of a word, use `$`: `"(e$)(ing$)"`.
438
+ *
439
+ */
441
440
  map: string;
442
441
  /** The cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical. */
443
442
  insDel?: number;
444
443
  /**
445
- * The cost to replace of of the substrings in the map with another substring in the map.
446
- * Example: Map['a', 'i']
447
- * This would be the cost to substitute `a` with `i`: Like `bat` to `bit` or the reverse.
448
- */
444
+ * The cost to replace of of the substrings in the map with another substring in the map.
445
+ * Example: Map['a', 'i']
446
+ * This would be the cost to substitute `a` with `i`: Like `bat` to `bit` or the reverse.
447
+ */
449
448
  replace?: number;
450
449
  /**
451
- * The cost to swap two adjacent substrings found in the map.
452
- * Example: Map['e', 'i']
453
- * This represents the cost to change `ei` to `ie` or the reverse.
454
- */
450
+ * The cost to swap two adjacent substrings found in the map.
451
+ * Example: Map['e', 'i']
452
+ * This represents the cost to change `ei` to `ie` or the reverse.
453
+ */
455
454
  swap?: number;
456
455
  /**
457
- * A description to describe the purpose of the map.
458
- */
456
+ * A description to describe the purpose of the map.
457
+ */
459
458
  description?: string;
460
459
  /**
461
- * Add a penalty to the final cost.
462
- * This is used to discourage certain suggestions.
463
- *
464
- * Example:
465
- * ```yaml
466
- * # Match adding/removing `-` to the end of a word.
467
- * map: "$(-$)"
468
- * replace: 50
469
- * penalty: 100
470
- * ```
471
- *
472
- * This makes adding a `-` to the end of a word more expensive.
473
- *
474
- * Think of it as taking the toll way for speed but getting the bill later.
475
- */
460
+ * Add a penalty to the final cost.
461
+ * This is used to discourage certain suggestions.
462
+ *
463
+ * Example:
464
+ * ```yaml
465
+ * # Match adding/removing `-` to the end of a word.
466
+ * map: "$(-$)"
467
+ * replace: 50
468
+ * penalty: 100
469
+ * ```
470
+ *
471
+ * This makes adding a `-` to the end of a word more expensive.
472
+ *
473
+ * Think of it as taking the toll way for speed but getting the bill later.
474
+ */
476
475
  penalty?: number;
477
476
  }
478
477
  interface CostMapDefReplace extends CostMapDefBase {
@@ -487,207 +486,207 @@ interface CostMapDefSwap extends CostMapDefBase {
487
486
  //#endregion
488
487
  //#region src/DictionaryInformation.d.ts
489
488
  /**
490
- * Use by dictionary authors to help improve the quality of suggestions
491
- * given from the dictionary.
492
- *
493
- * Added with `v5.16.0`.
494
- */
489
+ * Use by dictionary authors to help improve the quality of suggestions
490
+ * given from the dictionary.
491
+ *
492
+ * Added with `v5.16.0`.
493
+ */
495
494
  interface DictionaryInformation {
496
495
  /**
497
- * The locale of the dictionary.
498
- * Example: `nl,nl-be`
499
- */
496
+ * The locale of the dictionary.
497
+ * Example: `nl,nl-be`
498
+ */
500
499
  locale?: string;
501
500
  /**
502
- * The alphabet to use.
503
- * @default "a-zA-Z"
504
- */
501
+ * The alphabet to use.
502
+ * @default "a-zA-Z"
503
+ */
505
504
  alphabet?: CharacterSet | CharacterSetCosts[];
506
505
  /**
507
- * The accent characters.
508
- *
509
- * Default: `"\u0300-\u0341"`
510
- */
506
+ * The accent characters.
507
+ *
508
+ * Default: `"\u0300-\u0341"`
509
+ */
511
510
  accents?: CharacterSet | CharacterSetCosts[];
512
511
  /**
513
- * Define edit costs.
514
- */
512
+ * Define edit costs.
513
+ */
515
514
  costs?: EditCosts;
516
515
  /**
517
- * Used in making suggestions. The lower the value, the more likely the suggestion
518
- * will be near the top of the suggestion list.
519
- */
516
+ * Used in making suggestions. The lower the value, the more likely the suggestion
517
+ * will be near the top of the suggestion list.
518
+ */
520
519
  suggestionEditCosts?: SuggestionCostsDefs | undefined;
521
520
  /**
522
- * Used by dictionary authors
523
- */
521
+ * Used by dictionary authors
522
+ */
524
523
  hunspellInformation?: HunspellInformation;
525
524
  /**
526
- * A collection of patterns to test against the suggested words.
527
- * If the word matches the pattern, then the penalty is applied.
528
- */
525
+ * A collection of patterns to test against the suggested words.
526
+ * If the word matches the pattern, then the penalty is applied.
527
+ */
529
528
  adjustments?: PatternAdjustment[];
530
529
  /**
531
- * An optional set of characters that can possibly be removed from a word before
532
- * checking it.
533
- *
534
- * This is useful in languages like Arabic where Harakat accents are optional.
535
- *
536
- * Note: All matching characters are removed or none. Partial removal is not supported.
537
- */
530
+ * An optional set of characters that can possibly be removed from a word before
531
+ * checking it.
532
+ *
533
+ * This is useful in languages like Arabic where Harakat accents are optional.
534
+ *
535
+ * Note: All matching characters are removed or none. Partial removal is not supported.
536
+ */
538
537
  ignore?: CharacterSet;
539
538
  }
540
539
  interface HunspellInformation {
541
540
  /**
542
- * Selected Hunspell AFF content.
543
- * The content must be UTF-8
544
- *
545
- * Sections:
546
- * - TRY
547
- * - MAP
548
- * - REP
549
- * - KEY
550
- * - ICONV
551
- * - OCONV
552
- *
553
- * Example:
554
- * ```hunspell
555
- * # Comment
556
- * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
557
- * MAP aàâäAÀÂÄ
558
- * MAP eéèêëEÉÈÊË
559
- * MAP iîïyIÎÏY
560
- * MAP oôöOÔÖ
561
- * MAP (IJ)(IJ)
562
- * ```
563
- */
541
+ * Selected Hunspell AFF content.
542
+ * The content must be UTF-8
543
+ *
544
+ * Sections:
545
+ * - TRY
546
+ * - MAP
547
+ * - REP
548
+ * - KEY
549
+ * - ICONV
550
+ * - OCONV
551
+ *
552
+ * Example:
553
+ * ```hunspell
554
+ * # Comment
555
+ * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
556
+ * MAP aàâäAÀÂÄ
557
+ * MAP eéèêëEÉÈÊË
558
+ * MAP iîïyIÎÏY
559
+ * MAP oôöOÔÖ
560
+ * MAP (IJ)(IJ)
561
+ * ```
562
+ */
564
563
  aff: HunspellAffContent;
565
564
  /** The costs to apply when using the hunspell settings */
566
565
  costs?: HunspellCosts;
567
566
  }
568
567
  /**
569
- * Selected Hunspell AFF content.
570
- * The content must be UTF-8
571
- *
572
- * Sections:
573
- * - TRY
574
- * - NO-TRY
575
- * - MAP
576
- * - REP
577
- * - KEY
578
- * - ICONV
579
- * - OCONV
580
- *
581
- * Example:
582
- * ```hunspell
583
- * # Comment
584
- * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
585
- * NO-TRY -0123456789 # Discourage adding numbers and dashes.
586
- * MAP aàâäAÀÂÄ
587
- * MAP eéèêëEÉÈÊË
588
- * MAP iîïyIÎÏY
589
- * MAP oôöOÔÖ
590
- * MAP (IJ)(IJ)
591
- * ```
592
- */
568
+ * Selected Hunspell AFF content.
569
+ * The content must be UTF-8
570
+ *
571
+ * Sections:
572
+ * - TRY
573
+ * - NO-TRY
574
+ * - MAP
575
+ * - REP
576
+ * - KEY
577
+ * - ICONV
578
+ * - OCONV
579
+ *
580
+ * Example:
581
+ * ```hunspell
582
+ * # Comment
583
+ * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ`
584
+ * NO-TRY -0123456789 # Discourage adding numbers and dashes.
585
+ * MAP aàâäAÀÂÄ
586
+ * MAP eéèêëEÉÈÊË
587
+ * MAP iîïyIÎÏY
588
+ * MAP oôöOÔÖ
589
+ * MAP (IJ)(IJ)
590
+ * ```
591
+ */
593
592
  type HunspellAffContent = string;
594
593
  interface HunspellCosts extends EditCosts {
595
594
  /**
596
- * The cost of inserting / deleting / or swapping any `tryChars`
597
- * Defaults to `baseCosts`
598
- */
595
+ * The cost of inserting / deleting / or swapping any `tryChars`
596
+ * Defaults to `baseCosts`
597
+ */
599
598
  tryCharCost?: number;
600
599
  /**
601
- * The cost of replacing or swapping any adjacent keyboard characters.
602
- *
603
- * This should be slightly cheaper than `tryCharCost`.
604
- * @default 99
605
- */
600
+ * The cost of replacing or swapping any adjacent keyboard characters.
601
+ *
602
+ * This should be slightly cheaper than `tryCharCost`.
603
+ * @default 99
604
+ */
606
605
  keyboardCost?: number;
607
606
  /**
608
- * mapSet replacement cost is the cost to substitute one character with another from
609
- * the same set.
610
- *
611
- * Map characters are considered very similar to each other and are often
612
- * the cause of simple mistakes.
613
- *
614
- * @default 25
615
- */
607
+ * mapSet replacement cost is the cost to substitute one character with another from
608
+ * the same set.
609
+ *
610
+ * Map characters are considered very similar to each other and are often
611
+ * the cause of simple mistakes.
612
+ *
613
+ * @default 25
614
+ */
616
615
  mapCost?: number;
617
616
  /**
618
- * The cost to convert between convert pairs.
619
- *
620
- * The value should be slightly higher than the mapCost.
621
- *
622
- * @default 30
623
- */
617
+ * The cost to convert between convert pairs.
618
+ *
619
+ * The value should be slightly higher than the mapCost.
620
+ *
621
+ * @default 30
622
+ */
624
623
  ioConvertCost?: number;
625
624
  /**
626
- * The cost to substitute pairs found in the replace settings.
627
- *
628
- * @default 75
629
- */
625
+ * The cost to substitute pairs found in the replace settings.
626
+ *
627
+ * @default 75
628
+ */
630
629
  replaceCosts?: number;
631
630
  }
632
631
  /**
633
- *
634
- */
632
+ *
633
+ */
635
634
  interface EditCosts {
636
635
  /**
637
- * This is the base cost for making an edit.
638
- * @default 100
639
- */
636
+ * This is the base cost for making an edit.
637
+ * @default 100
638
+ */
640
639
  baseCost?: number;
641
640
  /**
642
- * This is the cost for characters not in the alphabet.
643
- * @default 110
644
- */
641
+ * This is the cost for characters not in the alphabet.
642
+ * @default 110
643
+ */
645
644
  nonAlphabetCosts?: number;
646
645
  /**
647
- * The extra cost incurred for changing the first letter of a word.
648
- * This value should be less than `100 - baseCost`.
649
- * @default 4
650
- */
646
+ * The extra cost incurred for changing the first letter of a word.
647
+ * This value should be less than `100 - baseCost`.
648
+ * @default 4
649
+ */
651
650
  firstLetterPenalty?: number;
652
651
  /**
653
- * The cost to change capitalization.
654
- * This should be very cheap, it helps with fixing capitalization issues.
655
- * @default 1
656
- */
652
+ * The cost to change capitalization.
653
+ * This should be very cheap, it helps with fixing capitalization issues.
654
+ * @default 1
655
+ */
657
656
  capsCosts?: number;
658
657
  /**
659
- * The cost to add / remove an accent
660
- * This should be very cheap, it helps with fixing accent issues.
661
- * @default 1
662
- */
658
+ * The cost to add / remove an accent
659
+ * This should be very cheap, it helps with fixing accent issues.
660
+ * @default 1
661
+ */
663
662
  accentCosts?: number;
664
663
  }
665
664
  /**
666
- * This is a set of characters that can include `-` or `|`
667
- * - `-` - indicates a range of characters: `a-c` => `abc`
668
- * - `|` - is a group separator, indicating that the characters on either side
669
- * are not related.
670
- */
665
+ * This is a set of characters that can include `-` or `|`
666
+ * - `-` - indicates a range of characters: `a-c` => `abc`
667
+ * - `|` - is a group separator, indicating that the characters on either side
668
+ * are not related.
669
+ */
671
670
  type CharacterSet = string;
672
671
  interface CharacterSetCosts {
673
672
  /**
674
- * This is a set of characters that can include `-` or `|`
675
- * - `-` - indicates a range of characters: `a-c` => `abc`
676
- * - `|` - is a group separator, indicating that the characters on either side
677
- * are not related.
678
- */
673
+ * This is a set of characters that can include `-` or `|`
674
+ * - `-` - indicates a range of characters: `a-c` => `abc`
675
+ * - `|` - is a group separator, indicating that the characters on either side
676
+ * are not related.
677
+ */
679
678
  characters: CharacterSet;
680
679
  /** the cost to insert / delete / replace / swap the characters in a group */
681
680
  cost: number;
682
681
  /**
683
- * The penalty cost to apply if the accent is used.
684
- * This is used to discourage
685
- */
682
+ * The penalty cost to apply if the accent is used.
683
+ * This is used to discourage
684
+ */
686
685
  penalty?: number;
687
686
  }
688
687
  /**
689
- * @hidden
690
- */
688
+ * @hidden
689
+ */
691
690
  type IRegExp = RegExp;
692
691
  interface PatternAdjustment {
693
692
  /** Id of the Adjustment, i.e. `short-compound` */
@@ -701,45 +700,45 @@ interface PatternAdjustment {
701
700
  //#region src/InlineDictionary.d.ts
702
701
  interface InlineDictionary {
703
702
  /**
704
- * List of words to be considered correct.
705
- */
703
+ * List of words to be considered correct.
704
+ */
706
705
  words?: string[];
707
706
  /**
708
- * List of words to always be considered incorrect. Words found in `flagWords` override `words`.
709
- *
710
- * Format of `flagWords`
711
- * - single word entry - `word`
712
- * - with suggestions - `word:suggestion` or `word->suggestion, suggestions`
713
- *
714
- * Example:
715
- * ```ts
716
- * "flagWords": [
717
- * "color: colour",
718
- * "incase: in case, encase",
719
- * "canot->cannot",
720
- * "cancelled->canceled"
721
- * ]
722
- * ```
723
- */
707
+ * List of words to always be considered incorrect. Words found in `flagWords` override `words`.
708
+ *
709
+ * Format of `flagWords`
710
+ * - single word entry - `word`
711
+ * - with suggestions - `word:suggestion` or `word->suggestion, suggestions`
712
+ *
713
+ * Example:
714
+ * ```ts
715
+ * "flagWords": [
716
+ * "color: colour",
717
+ * "incase: in case, encase",
718
+ * "canot->cannot",
719
+ * "cancelled->canceled"
720
+ * ]
721
+ * ```
722
+ */
724
723
  flagWords?: string[];
725
724
  /**
726
- * List of words to be ignored. An ignored word will not show up as an error, even if it is
727
- * also in the `flagWords`.
728
- */
725
+ * List of words to be ignored. An ignored word will not show up as an error, even if it is
726
+ * also in the `flagWords`.
727
+ */
729
728
  ignoreWords?: string[];
730
729
  /**
731
- * A list of suggested replacements for words.
732
- * Suggested words provide a way to make preferred suggestions on word replacements.
733
- * To hint at a preferred change, but not to require it.
734
- *
735
- * Format of `suggestWords`
736
- * - Single suggestion (possible auto fix)
737
- * - `word: suggestion`
738
- * - `word->suggestion`
739
- * - Multiple suggestions (not auto fixable)
740
- * - `word: first, second, third`
741
- * - `word->first, second, third`
742
- */
730
+ * A list of suggested replacements for words.
731
+ * Suggested words provide a way to make preferred suggestions on word replacements.
732
+ * To hint at a preferred change, but not to require it.
733
+ *
734
+ * Format of `suggestWords`
735
+ * - Single suggestion (possible auto fix)
736
+ * - `word: suggestion`
737
+ * - `word->suggestion`
738
+ * - Multiple suggestions (not auto fixable)
739
+ * - `word: first, second, third`
740
+ * - `word->first, second, third`
741
+ */
743
742
  suggestWords?: string[];
744
743
  }
745
744
  //#endregion
@@ -748,180 +747,180 @@ type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinition
748
747
  type DictionaryFileTypes = "S" | "W" | "C" | "T";
749
748
  interface DictionaryDefinitionBase {
750
749
  /**
751
- * This is the name of a dictionary.
752
- *
753
- * Name Format:
754
- * - Must contain at least 1 number or letter.
755
- * - Spaces are allowed.
756
- * - Leading and trailing space will be removed.
757
- * - Names ARE case-sensitive.
758
- * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`.
759
- */
750
+ * This is the name of a dictionary.
751
+ *
752
+ * Name Format:
753
+ * - Must contain at least 1 number or letter.
754
+ * - Spaces are allowed.
755
+ * - Leading and trailing space will be removed.
756
+ * - Names ARE case-sensitive.
757
+ * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`.
758
+ */
760
759
  name: DictionaryId;
761
760
  /**
762
- * Optional description of the contents / purpose of the dictionary.
763
- */
761
+ * Optional description of the contents / purpose of the dictionary.
762
+ */
764
763
  description?: string | undefined;
765
764
  /** Replacement pairs. */
766
765
  repMap?: ReplaceMap | undefined;
767
766
  /** Use Compounds. */
768
767
  useCompounds?: boolean | undefined;
769
768
  /**
770
- * Indicate that suggestions should not come from this dictionary.
771
- * Words in this dictionary are considered correct, but will not be
772
- * used when making spell correction suggestions.
773
- *
774
- * Note: if a word is suggested by another dictionary, but found in
775
- * this dictionary, it will be removed from the set of
776
- * possible suggestions.
777
- */
769
+ * Indicate that suggestions should not come from this dictionary.
770
+ * Words in this dictionary are considered correct, but will not be
771
+ * used when making spell correction suggestions.
772
+ *
773
+ * Note: if a word is suggested by another dictionary, but found in
774
+ * this dictionary, it will be removed from the set of
775
+ * possible suggestions.
776
+ */
778
777
  noSuggest?: boolean | undefined;
779
778
  /**
780
- * Some dictionaries may contain forbidden words to prevent compounding from generating
781
- * words that are not valid in the language. These are often
782
- * words that are used in other languages or might be generated through compounding.
783
- * This setting allows flagged words to be ignored when checking the dictionary.
784
- * The effect is similar to the word not being in the dictionary.
785
- */
779
+ * Some dictionaries may contain forbidden words to prevent compounding from generating
780
+ * words that are not valid in the language. These are often
781
+ * words that are used in other languages or might be generated through compounding.
782
+ * This setting allows flagged words to be ignored when checking the dictionary.
783
+ * The effect is similar to the word not being in the dictionary.
784
+ */
786
785
  ignoreForbiddenWords?: boolean | undefined;
787
786
  /**
788
- * Type of file:
789
- * - S - single word per line,
790
- * - W - each line can contain one or more words separated by space,
791
- * - C - each line is treated like code (Camel Case is allowed).
792
- *
793
- * Default is S.
794
- *
795
- * C is the slowest to load due to the need to split each line based upon code splitting rules.
796
- *
797
- * Note: this settings does not apply to inline dictionaries or `.trie` files.
798
- *
799
- * @default "S"
800
- */
787
+ * Type of file:
788
+ * - S - single word per line,
789
+ * - W - each line can contain one or more words separated by space,
790
+ * - C - each line is treated like code (Camel Case is allowed).
791
+ *
792
+ * Default is S.
793
+ *
794
+ * C is the slowest to load due to the need to split each line based upon code splitting rules.
795
+ *
796
+ * Note: this settings does not apply to inline dictionaries or `.trie` files.
797
+ *
798
+ * @default "S"
799
+ */
801
800
  type?: DictionaryFileTypes | undefined;
802
801
  /**
803
- * Strip case and accents to allow for case insensitive searches and
804
- * words without accents.
805
- *
806
- * Note: this setting only applies to word lists. It has no-impact on trie
807
- * dictionaries.
808
- *
809
- * @default true
810
- */
802
+ * Strip case and accents to allow for case insensitive searches and
803
+ * words without accents.
804
+ *
805
+ * Note: this setting only applies to word lists. It has no-impact on trie
806
+ * dictionaries.
807
+ *
808
+ * @default true
809
+ */
811
810
  supportNonStrictSearches?: boolean | undefined;
812
811
  }
813
812
  interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase {
814
813
  /**
815
- * Path or url to the dictionary file.
816
- */
814
+ * Path or url to the dictionary file.
815
+ */
817
816
  path: DictionaryPath;
818
817
  /**
819
- * An alternative path to a bTrie dictionary file.
820
- * It will be used in place of `path` if the version of CSpell being used
821
- * supports btrie files.
822
- * @since 9.6.0
823
- */
818
+ * An alternative path to a bTrie dictionary file.
819
+ * It will be used in place of `path` if the version of CSpell being used
820
+ * supports btrie files.
821
+ * @since 9.6.0
822
+ */
824
823
  btrie?: DictionaryPathToBTrie | undefined;
825
824
  /**
826
- * Only for legacy dictionary definitions.
827
- * @deprecated true
828
- * @deprecationMessage Use {@link path} instead.
829
- * @hidden
830
- */
825
+ * Only for legacy dictionary definitions.
826
+ * @deprecated true
827
+ * @deprecationMessage Use {@link path} instead.
828
+ * @hidden
829
+ */
831
830
  file?: undefined;
832
831
  }
833
832
  interface HiddenPaths {
834
833
  /**
835
- * @hide
836
- */
834
+ * @hide
835
+ */
837
836
  path?: string | undefined;
838
837
  /**
839
- * @hide
840
- */
838
+ * @hide
839
+ */
841
840
  btrie?: string | undefined;
842
841
  /**
843
- * @hide
844
- */
842
+ * @hide
843
+ */
845
844
  file?: undefined;
846
845
  }
847
846
  interface DictionaryDefinitionBaseWithPathsHidden extends DictionaryDefinitionBase, HiddenPaths {}
848
847
  /**
849
- * An Empty Dictionary Definition
850
- */
848
+ * An Empty Dictionary Definition
849
+ */
851
850
  interface DictionaryDefinitionSimple extends DictionaryDefinitionBaseWithPathsHidden {
852
851
  /**
853
- * @hide
854
- */
852
+ * @hide
853
+ */
855
854
  repMap?: ReplaceMap | undefined;
856
855
  /**
857
- * @hide
858
- */
856
+ * @hide
857
+ */
859
858
  useCompounds?: boolean | undefined;
860
859
  /**
861
- * @hide
862
- */
860
+ * @hide
861
+ */
863
862
  noSuggest?: boolean | undefined;
864
863
  /**
865
- * @hide
866
- */
864
+ * @hide
865
+ */
867
866
  ignoreForbiddenWords?: boolean | undefined;
868
867
  /**
869
- * @hide
870
- */
868
+ * @hide
869
+ */
871
870
  type?: DictionaryFileTypes | undefined;
872
871
  }
873
872
  /**
874
- * Used to provide extra data related to the dictionary
875
- */
873
+ * Used to provide extra data related to the dictionary
874
+ */
876
875
  interface DictionaryDefinitionAugmented extends DictionaryDefinitionPreferred {
877
876
  dictionaryInformation?: DictionaryInformation;
878
877
  }
879
878
  interface HiddenFields {
880
879
  /**
881
- * Not used
882
- * @hide
883
- */
880
+ * Not used
881
+ * @hide
882
+ */
884
883
  path?: undefined;
885
884
  /**
886
- * Not used
887
- * @hide
888
- */
885
+ * Not used
886
+ * @hide
887
+ */
889
888
  btrie?: string | undefined;
890
889
  /**
891
- * Not used
892
- * @hide
893
- */
890
+ * Not used
891
+ * @hide
892
+ */
894
893
  file?: undefined;
895
894
  /**
896
- * Not used
897
- * @hide
898
- */
895
+ * Not used
896
+ * @hide
897
+ */
899
898
  type?: undefined;
900
899
  /**
901
- * Use `ignoreWords` instead.
902
- * @hide
903
- */
900
+ * Use `ignoreWords` instead.
901
+ * @hide
902
+ */
904
903
  noSuggest?: undefined;
905
904
  /**
906
- * Not used
907
- * @hide
908
- */
905
+ * Not used
906
+ * @hide
907
+ */
909
908
  ignoreForbiddenWords?: undefined;
910
909
  /**
911
- * Not used
912
- * @hide
913
- */
910
+ * Not used
911
+ * @hide
912
+ */
914
913
  useCompounds?: undefined;
915
914
  /**
916
- * @hide
917
- */
915
+ * @hide
916
+ */
918
917
  repMap?: undefined;
919
918
  }
920
919
  /**
921
- * Inline Dictionary Definition
922
- *
923
- * All words are defined inline.
924
- */
920
+ * Inline Dictionary Definition
921
+ *
922
+ * All words are defined inline.
923
+ */
925
924
  type DictionaryDefinitionInlineBase = Omit<DictionaryDefinitionBase, keyof HiddenFields> & HiddenFields & InlineDictionary;
926
925
  interface DictionaryDefinitionInlineWords extends DictionaryDefinitionInlineBase, Required<Pick<InlineDictionary, "words">> {
927
926
  words: string[];
@@ -936,247 +935,247 @@ interface DictionaryDefinitionInlineSuggestWords extends DictionaryDefinitionInl
936
935
  suggestWords: string[];
937
936
  }
938
937
  /**
939
- * Inline Dictionary Definitions
940
- * @since 6.23.0
941
- */
938
+ * Inline Dictionary Definitions
939
+ * @since 6.23.0
940
+ */
942
941
  type DictionaryDefinitionInline = DictionaryDefinitionInlineWords | DictionaryDefinitionInlineIgnoreWords | DictionaryDefinitionInlineFlagWords | DictionaryDefinitionInlineSuggestWords;
943
942
  /**
944
- * Only for legacy dictionary definitions.
945
- * @deprecated true
946
- * @deprecationMessage Use {@link DictionaryDefinitionPreferred} instead.
947
- * This will be removed in a future release.
948
- */
943
+ * Only for legacy dictionary definitions.
944
+ * @deprecated true
945
+ * @deprecationMessage Use {@link DictionaryDefinitionPreferred} instead.
946
+ * This will be removed in a future release.
947
+ */
949
948
  interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase, Omit<HiddenPaths, "file"> {
950
949
  /**
951
- * Path to the file, only for legacy dictionary definitions.
952
- * @deprecated true
953
- * @deprecationMessage Use `path` instead.
954
- */
950
+ * Path to the file, only for legacy dictionary definitions.
951
+ * @deprecated true
952
+ * @deprecationMessage Use `path` instead.
953
+ */
955
954
  file: DictionaryPath;
956
955
  /**
957
- * @hidden
958
- */
956
+ * @hidden
957
+ */
959
958
  suggestionEditCosts?: undefined;
960
959
  }
961
960
  /**
962
- * @deprecated true
963
- * @deprecationMessage Use {@link DictionaryDefinitionPreferred} instead.
964
- * This will be removed in a future release.
965
- * @hidden
966
- */
961
+ * @deprecated true
962
+ * @deprecationMessage Use {@link DictionaryDefinitionPreferred} instead.
963
+ * This will be removed in a future release.
964
+ * @hidden
965
+ */
967
966
  interface DictionaryDefinitionLegacy extends DictionaryDefinitionBase, Omit<HiddenPaths, "file" | "path"> {
968
967
  /** Path to the file, if undefined the path to the extension dictionaries is assumed. */
969
968
  path?: FsDictionaryPath;
970
969
  /**
971
- * File name.
972
- * @deprecated true
973
- * @deprecationMessage Use {@link path} instead.
974
- */
970
+ * File name.
971
+ * @deprecated true
972
+ * @deprecationMessage Use {@link path} instead.
973
+ */
975
974
  file: FsDictionaryPath;
976
975
  /**
977
- * Type of file:
978
- * - S - single word per line,
979
- * - W - each line can contain one or more words separated by space,
980
- * - C - each line is treated like code (Camel Case is allowed).
981
- *
982
- * Default is S.
983
- *
984
- * C is the slowest to load due to the need to split each line based upon code splitting rules.
985
- * @default "S"
986
- */
976
+ * Type of file:
977
+ * - S - single word per line,
978
+ * - W - each line can contain one or more words separated by space,
979
+ * - C - each line is treated like code (Camel Case is allowed).
980
+ *
981
+ * Default is S.
982
+ *
983
+ * C is the slowest to load due to the need to split each line based upon code splitting rules.
984
+ * @default "S"
985
+ */
987
986
  type?: DictionaryFileTypes;
988
987
  /**
989
- * @hidden
990
- */
988
+ * @hidden
989
+ */
991
990
  suggestionEditCosts?: undefined;
992
991
  }
993
992
  /**
994
- * Specifies the scope of a dictionary.
995
- */
993
+ * Specifies the scope of a dictionary.
994
+ */
996
995
  type CustomDictionaryScope = "user" | "workspace" | "folder";
997
996
  /**
998
- * For Defining Custom dictionaries. They are generally scoped to a
999
- * `user`, `workspace`, or `folder`.
1000
- * When `addWords` is true, indicates that the spell checker can add words
1001
- * to the file.
1002
- *
1003
- * Note: only plain text files with one word per line are supported at this moment.
1004
- */
997
+ * For Defining Custom dictionaries. They are generally scoped to a
998
+ * `user`, `workspace`, or `folder`.
999
+ * When `addWords` is true, indicates that the spell checker can add words
1000
+ * to the file.
1001
+ *
1002
+ * Note: only plain text files with one word per line are supported at this moment.
1003
+ */
1005
1004
  interface DictionaryDefinitionCustom extends DictionaryDefinitionPreferred {
1006
1005
  /**
1007
- * A file path or url to a custom dictionary file.
1008
- */
1006
+ * A file path or url to a custom dictionary file.
1007
+ */
1009
1008
  path: CustomDictionaryPath;
1010
1009
  /**
1011
- * Defines the scope for when words will be added to the dictionary.
1012
- *
1013
- * Scope values: `user`, `workspace`, `folder`.
1014
- */
1010
+ * Defines the scope for when words will be added to the dictionary.
1011
+ *
1012
+ * Scope values: `user`, `workspace`, `folder`.
1013
+ */
1015
1014
  scope?: CustomDictionaryScope | CustomDictionaryScope[];
1016
1015
  /**
1017
- * When `true`, let's the spell checker know that words can be added to this dictionary.
1018
- */
1016
+ * When `true`, let's the spell checker know that words can be added to this dictionary.
1017
+ */
1019
1018
  addWords: boolean;
1020
1019
  }
1021
1020
  /**
1022
- * This is the name of a dictionary.
1023
- *
1024
- * Name Format:
1025
- * - Must contain at least 1 number or letter.
1026
- * - Spaces are allowed.
1027
- * - Leading and trailing space will be removed.
1028
- * - Names ARE case-sensitive.
1029
- * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`.
1030
- *
1031
- * @pattern ^(?=[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
1032
- */
1021
+ * This is the name of a dictionary.
1022
+ *
1023
+ * Name Format:
1024
+ * - Must contain at least 1 number or letter.
1025
+ * - Spaces are allowed.
1026
+ * - Leading and trailing space will be removed.
1027
+ * - Names ARE case-sensitive.
1028
+ * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`.
1029
+ *
1030
+ * @pattern ^(?=[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
1031
+ */
1033
1032
  type DictionaryId = string;
1034
1033
  type ReplaceEntry = [string, string];
1035
1034
  type ReplaceMap = ReplaceEntry[];
1036
1035
  /**
1037
- * A File System Path. Relative paths are relative to the configuration file.
1038
- */
1036
+ * A File System Path. Relative paths are relative to the configuration file.
1037
+ */
1039
1038
  type FsDictionaryPath = string;
1040
1039
  /**
1041
- * A File System Path to a dictionary file.
1042
- * Pattern: `^.*\.(?:txt|trie|btrie|dic)(?:\.gz)?$`
1043
- */
1040
+ * A File System Path to a dictionary file.
1041
+ * Pattern: `^.*\.(?:txt|trie|btrie|dic)(?:\.gz)?$`
1042
+ */
1044
1043
  type DictionaryPath = string;
1045
1044
  /**
1046
- * A File System Path to a dictionary file.
1047
- * Pattern: `^.*\.(?:btrie)(?:\.gz)?$`
1048
- * @since 9.6.0
1049
- */
1045
+ * A File System Path to a dictionary file.
1046
+ * Pattern: `^.*\.(?:btrie)(?:\.gz)?$`
1047
+ * @since 9.6.0
1048
+ */
1050
1049
  type DictionaryPathToBTrie = string;
1051
1050
  /**
1052
- * A path or url to a custom dictionary file.
1053
- */
1051
+ * A path or url to a custom dictionary file.
1052
+ */
1054
1053
  type CustomDictionaryPath = string;
1055
1054
  /**
1056
- * Reference to a dictionary by name.
1057
- * One of:
1058
- * - {@link DictionaryRef}
1059
- * - {@link DictionaryNegRef}
1060
- */
1055
+ * Reference to a dictionary by name.
1056
+ * One of:
1057
+ * - {@link DictionaryRef}
1058
+ * - {@link DictionaryNegRef}
1059
+ */
1061
1060
  type DictionaryReference = DictionaryRef | DictionaryNegRef;
1062
1061
  /**
1063
- * This a reference to a named dictionary.
1064
- * It is expected to match the name of a dictionary.
1065
- */
1062
+ * This a reference to a named dictionary.
1063
+ * It is expected to match the name of a dictionary.
1064
+ */
1066
1065
  type DictionaryRef = DictionaryId;
1067
1066
  /**
1068
- * This a negative reference to a named dictionary.
1069
- *
1070
- * It is used to exclude or include a dictionary by name.
1071
- *
1072
- * The reference starts with 1 or more `!`.
1073
- * - `!<dictionary_name>` - Used to exclude the dictionary matching `<dictionary_name>`.
1074
- * - `!!<dictionary_name>` - Used to re-include a dictionary matching `<dictionary_name>`.
1075
- * Overrides `!<dictionary_name>`.
1076
- * - `!!!<dictionary_name>` - Used to exclude a dictionary matching `<dictionary_name>`.
1077
- * Overrides `!!<dictionary_name>`.
1078
- *
1079
- * @pattern ^(?=!+[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
1080
- */
1067
+ * This a negative reference to a named dictionary.
1068
+ *
1069
+ * It is used to exclude or include a dictionary by name.
1070
+ *
1071
+ * The reference starts with 1 or more `!`.
1072
+ * - `!<dictionary_name>` - Used to exclude the dictionary matching `<dictionary_name>`.
1073
+ * - `!!<dictionary_name>` - Used to re-include a dictionary matching `<dictionary_name>`.
1074
+ * Overrides `!<dictionary_name>`.
1075
+ * - `!!!<dictionary_name>` - Used to exclude a dictionary matching `<dictionary_name>`.
1076
+ * Overrides `!!<dictionary_name>`.
1077
+ *
1078
+ * @pattern ^(?=!+[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
1079
+ */
1081
1080
  type DictionaryNegRef = string;
1082
1081
  //#endregion
1083
1082
  //#region src/features.d.ts
1084
1083
  /**
1085
- * These are experimental features and are subject to change or removal without notice.
1086
- */
1084
+ * These are experimental features and are subject to change or removal without notice.
1085
+ */
1087
1086
  interface FeaturesExperimental {
1088
1087
  /**
1089
- * Enable/disable using weighted suggestions.
1090
- */
1088
+ * Enable/disable using weighted suggestions.
1089
+ */
1091
1090
  "weighted-suggestions": FeatureEnableOnly;
1092
1091
  }
1093
1092
  /**
1094
- * These are the current set of active features
1095
- */
1093
+ * These are the current set of active features
1094
+ */
1096
1095
  interface FeaturesActive {
1097
1096
  /**
1098
- * @hidden
1099
- */
1097
+ * @hidden
1098
+ */
1100
1099
  featureName?: boolean;
1101
1100
  }
1102
1101
  /**
1103
- * These are feature settings that have been deprecated or moved elsewhere they will have no
1104
- * effect on the code but are here to prevent schema errors. The will get cleaned out on major versions.
1105
- */
1102
+ * These are feature settings that have been deprecated or moved elsewhere they will have no
1103
+ * effect on the code but are here to prevent schema errors. The will get cleaned out on major versions.
1104
+ */
1106
1105
  interface FeaturesDeprecated {
1107
1106
  /**
1108
- * @hidden
1109
- */
1107
+ * @hidden
1108
+ */
1110
1109
  featureName?: boolean;
1111
1110
  }
1112
1111
  /**
1113
- * Features are behaviors or settings that can be explicitly configured.
1114
- */
1112
+ * Features are behaviors or settings that can be explicitly configured.
1113
+ */
1115
1114
  interface Features extends Partial<FeaturesActive>, Partial<FeaturesDeprecated>, Partial<FeaturesExperimental> {}
1116
1115
  type Feature = FeatureEnableOnly | FeatureWithConfiguration;
1117
1116
  type FeatureEnableOnly = boolean;
1118
1117
  /**
1119
- * Feature Configuration.
1120
- */
1118
+ * Feature Configuration.
1119
+ */
1121
1120
  interface FeatureWithConfiguration {
1122
1121
  enable: boolean;
1123
1122
  }
1124
1123
  //#endregion
1125
1124
  //#region src/Substitutions.d.ts
1126
1125
  /**
1127
- * The ID for a substitution definition. This is used to reference the substitution definition in the substitutions array.
1128
- * @since 9.7.0
1129
- */
1126
+ * The ID for a substitution definition. This is used to reference the substitution definition in the substitutions array.
1127
+ * @since 9.7.0
1128
+ */
1130
1129
  type SubstitutionID = string;
1131
1130
  /**
1132
- * A substitution entry is a tuple of the form `[find, replacement]`. The find string is the string to find,
1133
- * and the replacement string is the string to replace it with.
1134
- *
1135
- * - `find` - The string to find. This is the string that will be replaced in the text. Only an exact match will be replaced.
1136
- * The find string is not treated as a regular expression.
1137
- * - `replacement` - The string to replace the `find` string with. This is the string that will be used to replace the `find`
1138
- * string in the text.
1139
- *
1140
- * @since 9.7.0
1141
- */
1131
+ * A substitution entry is a tuple of the form `[find, replacement]`. The find string is the string to find,
1132
+ * and the replacement string is the string to replace it with.
1133
+ *
1134
+ * - `find` - The string to find. This is the string that will be replaced in the text. Only an exact match will be replaced.
1135
+ * The find string is not treated as a regular expression.
1136
+ * - `replacement` - The string to replace the `find` string with. This is the string that will be used to replace the `find`
1137
+ * string in the text.
1138
+ *
1139
+ * @since 9.7.0
1140
+ */
1142
1141
  type SubstitutionEntry = [find: string, replacement: string];
1143
1142
  /**
1144
- * Allows for the definition of a substitution set. A substitution set is a collection of substitution
1145
- * entries that can be applied to a document before spell checking. This is useful for converting html entities, url encodings,
1146
- * or other transformations that may be necessary to get the correct text for spell checking.
1147
- *
1148
- * Substitutions are applied based upon the longest matching find string. If there are multiple matches of the same `find`,
1149
- * the last one in the list is used. This allows for the overriding of substitutions. For example, if you have a substitution
1150
- * for `&` to `and`, and then a substitution for `&amp;` to `&`, the `&amp;` substitution will be used for the string `&amp;`,
1151
- * and the `&` substitution will be used for the string `&`.
1152
- *
1153
- * @since 9.7.0
1154
- */
1143
+ * Allows for the definition of a substitution set. A substitution set is a collection of substitution
1144
+ * entries that can be applied to a document before spell checking. This is useful for converting html entities, url encodings,
1145
+ * or other transformations that may be necessary to get the correct text for spell checking.
1146
+ *
1147
+ * Substitutions are applied based upon the longest matching find string. If there are multiple matches of the same `find`,
1148
+ * the last one in the list is used. This allows for the overriding of substitutions. For example, if you have a substitution
1149
+ * for `&` to `and`, and then a substitution for `&amp;` to `&`, the `&amp;` substitution will be used for the string `&amp;`,
1150
+ * and the `&` substitution will be used for the string `&`.
1151
+ *
1152
+ * @since 9.7.0
1153
+ */
1155
1154
  interface SubstitutionDefinition {
1156
1155
  /**
1157
- * The name of the substitution definition. This is used to reference the substitution definition in the substitutions array.
1158
- */
1156
+ * The name of the substitution definition. This is used to reference the substitution definition in the substitutions array.
1157
+ */
1159
1158
  name: SubstitutionID;
1160
1159
  /**
1161
- * An optional description of the substitution definition. This is not used for anything, but can be useful for
1162
- * documentation purposes.
1163
- */
1160
+ * An optional description of the substitution definition. This is not used for anything, but can be useful for
1161
+ * documentation purposes.
1162
+ */
1164
1163
  description?: string;
1165
1164
  /**
1166
- * The entries for the substitution definition. This is a collection of substitution entries that can be applied to a
1167
- * document before spell checking.
1168
- */
1165
+ * The entries for the substitution definition. This is a collection of substitution entries that can be applied to a
1166
+ * document before spell checking.
1167
+ */
1169
1168
  entries: SubstitutionEntry[];
1170
1169
  }
1171
1170
  /**
1172
- * The set of available substitutions. This is a collection of substitution definitions that can be applied to a document
1173
- * before spell checking.
1174
- */
1171
+ * The set of available substitutions. This is a collection of substitution definitions that can be applied to a document
1172
+ * before spell checking.
1173
+ */
1175
1174
  type SubstitutionDefinitions = SubstitutionDefinition[];
1176
1175
  /**
1177
- * The set of substitutions to apply to a document before spell checking.
1178
- * This is a collection of substitution entries that can be applied to a document before spell checking.
1179
- */
1176
+ * The set of substitutions to apply to a document before spell checking.
1177
+ * This is a collection of substitution entries that can be applied to a document before spell checking.
1178
+ */
1180
1179
  type Substitutions = (SubstitutionEntry | SubstitutionID)[];
1181
1180
  //#endregion
1182
1181
  //#region src/types.d.ts
@@ -1184,8 +1183,8 @@ type Serializable = number | string | boolean | null | object;
1184
1183
  //#endregion
1185
1184
  //#region src/CSpellSettingsDef.d.ts
1186
1185
  /**
1187
- * These settings come from user and workspace settings.
1188
- */
1186
+ * These settings come from user and workspace settings.
1187
+ */
1189
1188
  type CSpellPackageSettings = CSpellUserSettings;
1190
1189
  type CSpellUserSettings = CSpellSettings;
1191
1190
  interface CSpellSettings extends FileSettings, LegacySettings {}
@@ -1203,380 +1202,384 @@ interface CSpellSettingsWithSourceTrace extends CSpellSettings {
1203
1202
  interface AdvancedCSpellSettingsWithSourceTrace extends CSpellSettingsWithSourceTrace, ExperimentalFileSettings {}
1204
1203
  interface FileSettings extends ExtendableSettings, CommandLineSettings {
1205
1204
  /**
1206
- * Url to JSON Schema
1207
- * @default "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json"
1208
- */
1205
+ * Url to JSON Schema
1206
+ * @default "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json"
1207
+ */
1209
1208
  $schema?: string;
1210
1209
  /**
1211
- * Configuration format version of the settings file.
1212
- *
1213
- * This controls how the settings in the configuration file behave.
1214
- *
1215
- * @default "0.2"
1216
- */
1210
+ * Configuration format version of the settings file.
1211
+ *
1212
+ * This controls how the settings in the configuration file behave.
1213
+ *
1214
+ * @default "0.2"
1215
+ */
1217
1216
  version?: Version;
1218
1217
  /** Words to add to global dictionary -- should only be in the user config file. */
1219
1218
  userWords?: string[];
1220
1219
  /**
1221
- * Allows this configuration to inherit configuration for one or more other files.
1222
- *
1223
- * See [Importing / Extending Configuration](https://cspell.org/configuration/imports/) for more details.
1224
- */
1220
+ * Allows this configuration to inherit configuration for one or more other files.
1221
+ *
1222
+ * See [Importing / Extending Configuration](https://cspell.org/configuration/imports/) for more details.
1223
+ */
1225
1224
  import?: FsPath | FsPath[];
1226
1225
  /**
1227
- * The root to use for glob patterns found in this configuration.
1228
- * Default: location of the configuration file.
1229
- * For compatibility reasons, config files with version 0.1, the glob root will
1230
- * default to be `${cwd}`.
1231
- *
1232
- * Use `globRoot` to define a different location.
1233
- * `globRoot` can be relative to the location of this configuration file.
1234
- * Defining globRoot, does not impact imported configurations.
1235
- *
1236
- * Special Values:
1237
- * - `${cwd}` - will be replaced with the current working directory.
1238
- * - `.` - will be the location of the containing configuration file.
1239
- *
1240
- */
1226
+ * The root to use for glob patterns found in this configuration.
1227
+ * Default: location of the configuration file.
1228
+ * For compatibility reasons, config files with version 0.1, the glob root will
1229
+ * default to be `${cwd}`.
1230
+ *
1231
+ * Use `globRoot` to define a different location.
1232
+ * `globRoot` can be relative to the location of this configuration file.
1233
+ * Defining globRoot, does not impact imported configurations.
1234
+ *
1235
+ * Special Values:
1236
+ * - `${cwd}` - will be replaced with the current working directory.
1237
+ * - `.` - will be the location of the containing configuration file.
1238
+ *
1239
+ */
1241
1240
  globRoot?: FSPathResolvable;
1242
1241
  /**
1243
- * Glob patterns of files to be checked.
1244
- *
1245
- * Glob patterns are relative to the `globRoot` of the configuration file that defines them.
1246
- */
1242
+ * Glob patterns of files to be checked.
1243
+ *
1244
+ * Glob patterns are relative to the `globRoot` of the configuration file that defines them.
1245
+ */
1247
1246
  files?: Glob[];
1248
1247
  /**
1249
- * Enable scanning files and directories beginning with `.` (period).
1250
- *
1251
- * By default, CSpell does not scan `hidden` files.
1252
- *
1253
- * @default false
1254
- */
1248
+ * Enable scanning files and directories beginning with `.` (period).
1249
+ *
1250
+ * By default, CSpell does not scan `hidden` files.
1251
+ *
1252
+ * @default false
1253
+ */
1255
1254
  enableGlobDot?: boolean;
1256
1255
  /**
1257
- * Glob patterns of files to be ignored.
1258
- *
1259
- * Glob patterns are relative to the {@link globRoot} of the configuration file that defines them.
1260
- */
1256
+ * Glob patterns of files to be ignored.
1257
+ *
1258
+ * Glob patterns are relative to the {@link globRoot} of the configuration file that defines them.
1259
+ *
1260
+ * The default is `["node_modules/"]`.
1261
+ *
1262
+ * Warning: if you ignore `".git/"` then it will also ignore `".git/COMMIT_EDITMSG"` which is needed for the `commit-msg` git hook; in that case, rather use `[".git/{info,lfs,logs,refs,objects}/**", ".git/{index,*refs,*HEAD}"]`.
1263
+ */
1261
1264
  ignorePaths?: Glob[];
1262
1265
  /**
1263
- * Prevents searching for local configuration when checking individual documents.
1264
- *
1265
- * @default false
1266
- */
1266
+ * Prevents searching for local configuration when checking individual documents.
1267
+ *
1268
+ * @default false
1269
+ */
1267
1270
  noConfigSearch?: boolean;
1268
1271
  /**
1269
- * Indicate that the configuration file should not be modified.
1270
- * This is used to prevent tools like the VS Code Spell Checker from
1271
- * modifying the file to add words and other configuration.
1272
- *
1273
- * @default false
1274
- */
1272
+ * Indicate that the configuration file should not be modified.
1273
+ * This is used to prevent tools like the VS Code Spell Checker from
1274
+ * modifying the file to add words and other configuration.
1275
+ *
1276
+ * @default false
1277
+ */
1275
1278
  readonly?: boolean;
1276
1279
  /**
1277
- * Define which reports to use.
1278
- * `default` - is a special name for the default cli reporter.
1279
- *
1280
- * Examples:
1281
- * - `["default"]` - to use the default reporter
1282
- * - `["@cspell/cspell-json-reporter"]` - use the cspell JSON reporter.
1283
- * - `[["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]`
1284
- * - `[ "default", ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]` - Use both the default reporter and the cspell-json-reporter.
1285
- *
1286
- * @default ["default"]
1287
- */
1280
+ * Define which reports to use.
1281
+ * `default` - is a special name for the default cli reporter.
1282
+ *
1283
+ * Examples:
1284
+ * - `["default"]` - to use the default reporter
1285
+ * - `["@cspell/cspell-json-reporter"]` - use the cspell JSON reporter.
1286
+ * - `[["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]`
1287
+ * - `[ "default", ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]` - Use both the default reporter and the cspell-json-reporter.
1288
+ *
1289
+ * @default ["default"]
1290
+ */
1288
1291
  reporters?: ReporterSettings[];
1289
1292
  /**
1290
- * Tells the spell checker to load `.gitignore` files and skip files that match the globs in the `.gitignore` files found.
1291
- * @default false
1292
- */
1293
+ * Tells the spell checker to load `.gitignore` files and skip files that match the globs in the `.gitignore` files found.
1294
+ * @default false
1295
+ */
1293
1296
  useGitignore?: boolean;
1294
1297
  /**
1295
- * Tells the spell checker to stop searching for `.gitignore` files when it reaches a matching root.
1296
- */
1298
+ * Tells the spell checker to stop searching for `.gitignore` files when it reaches a matching root.
1299
+ */
1297
1300
  gitignoreRoot?: FsPath | FsPath[];
1298
1301
  /**
1299
- * Verify that the in-document directives are correct.
1300
- */
1302
+ * Verify that the in-document directives are correct.
1303
+ */
1301
1304
  validateDirectives?: boolean;
1302
1305
  /**
1303
- * Files to add to the CSpell Virtual File System.
1304
- *
1305
- * They can be referenced using `cspell-vfs:///<module>/<path-to-file>/<file-name>` URLs.
1306
- *
1307
- * They can be referenced in the `path` field of dictionary definitions.
1308
- *
1309
- * @since 9.7.0
1310
- * @stability experimental
1311
- */
1306
+ * Files to add to the CSpell Virtual File System.
1307
+ *
1308
+ * They can be referenced using `cspell-vfs:///<module>/<path-to-file>/<file-name>` URLs.
1309
+ *
1310
+ * They can be referenced in the `path` field of dictionary definitions.
1311
+ *
1312
+ * @since 9.7.0
1313
+ * @stability experimental
1314
+ */
1312
1315
  vfs?: CSpellVFS | undefined;
1313
1316
  /**
1314
- * Configure CSpell features.
1315
- *
1316
- * @since 5.16.0
1317
- */
1317
+ * Configure CSpell features.
1318
+ *
1319
+ * @since 5.16.0
1320
+ */
1318
1321
  features?: Features;
1319
1322
  /**
1320
- * Specify compatible engine versions.
1321
- *
1322
- * This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.
1323
- *
1324
- * It does not enforce compatibility, it is up to the client to use this information as needed.
1325
- *
1326
- * @since 9.6.3
1327
- */
1323
+ * Specify compatible engine versions.
1324
+ *
1325
+ * This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.
1326
+ *
1327
+ * It does not enforce compatibility, it is up to the client to use this information as needed.
1328
+ *
1329
+ * @since 9.6.3
1330
+ */
1328
1331
  engines?: CompatibleEngineVersions;
1329
1332
  }
1330
1333
  /**
1331
- * In the below JSDoc comment, we helpfully specify an example configuration for the end-user to
1332
- * reference. And this example will get captured by the automatic documentation generator.
1333
- *
1334
- * However, specifying the glob pattern inside of a JSDoc is tricky, because the glob contains the
1335
- * same symbol as the end-of-JSDoc symbol. To work around this, we insert a zero-width space in
1336
- * between the "*" and the "/" symbols. The zero-width space is automatically removed by the schema generator.
1337
- */
1334
+ * In the below JSDoc comment, we helpfully specify an example configuration for the end-user to
1335
+ * reference. And this example will get captured by the automatic documentation generator.
1336
+ *
1337
+ * However, specifying the glob pattern inside of a JSDoc is tricky, because the glob contains the
1338
+ * same symbol as the end-of-JSDoc symbol. To work around this, we insert a zero-width space in
1339
+ * between the "*" and the "/" symbols. The zero-width space is automatically removed by the schema generator.
1340
+ */
1338
1341
  interface ExtendableSettings extends Settings {
1339
1342
  /**
1340
- * Overrides are used to apply settings for specific files in your project.
1341
- *
1342
- * For example:
1343
- *
1344
- * ```javascript
1345
- * "overrides": [
1346
- * // Force `*.hrr` and `*.crr` files to be treated as `cpp` files:
1347
- * {
1348
- * "filename": "**​/{*.hrr,*.crr}",
1349
- * "languageId": "cpp"
1350
- * },
1351
- * // Force `*.txt` to use the Dutch dictionary (Dutch dictionary needs to be installed separately):
1352
- * {
1353
- * "language": "nl",
1354
- * "filename": "**​/dutch/**​/*.txt"
1355
- * }
1356
- * ]
1357
- * ```
1358
- */
1343
+ * Overrides are used to apply settings for specific files in your project.
1344
+ *
1345
+ * For example:
1346
+ *
1347
+ * ```javascript
1348
+ * "overrides": [
1349
+ * // Force `*.hrr` and `*.crr` files to be treated as `cpp` files:
1350
+ * {
1351
+ * "filename": "**​/{*.hrr,*.crr}",
1352
+ * "languageId": "cpp"
1353
+ * },
1354
+ * // Force `*.txt` to use the Dutch dictionary (Dutch dictionary needs to be installed separately):
1355
+ * {
1356
+ * "language": "nl",
1357
+ * "filename": "**​/dutch/**​/*.txt"
1358
+ * }
1359
+ * ]
1360
+ * ```
1361
+ */
1359
1362
  overrides?: OverrideSettings[];
1360
1363
  }
1361
1364
  interface SpellCheckerExtensionSettings {
1362
1365
  /**
1363
- * Specify a list of file types to spell check. It is better to use {@link Settings.enabledFileTypes} to Enable / Disable checking files types.
1364
- * @title Enabled Language Ids
1365
- * @uniqueItems true
1366
- */
1366
+ * Specify a list of file types to spell check. It is better to use {@link Settings.enabledFileTypes} to Enable / Disable checking files types.
1367
+ * @title Enabled Language Ids
1368
+ * @uniqueItems true
1369
+ */
1367
1370
  enabledLanguageIds?: LanguageIdSingle[];
1368
1371
  /**
1369
- * Enable / Disable checking file types (languageIds).
1370
- *
1371
- * These are in additional to the file types specified by {@link Settings.enabledLanguageIds}.
1372
- * To disable a language, prefix with `!` as in `!json`,
1373
- *
1374
- *
1375
- * **Example: individual file types**
1376
- *
1377
- * ```
1378
- * jsonc // enable checking for jsonc
1379
- * !json // disable checking for json
1380
- * kotlin // enable checking for kotlin
1381
- * ```
1382
- *
1383
- * **Example: enable all file types**
1384
- *
1385
- * ```
1386
- * * // enable checking for all file types
1387
- * !json // except for json
1388
- * ```
1389
- * @title Enable File Types
1390
- * @scope resource
1391
- * @uniqueItems true
1392
- */
1372
+ * Enable / Disable checking file types (languageIds).
1373
+ *
1374
+ * These are in additional to the file types specified by {@link Settings.enabledLanguageIds}.
1375
+ * To disable a language, prefix with `!` as in `!json`,
1376
+ *
1377
+ *
1378
+ * **Example: individual file types**
1379
+ *
1380
+ * ```
1381
+ * jsonc // enable checking for jsonc
1382
+ * !json // disable checking for json
1383
+ * kotlin // enable checking for kotlin
1384
+ * ```
1385
+ *
1386
+ * **Example: enable all file types**
1387
+ *
1388
+ * ```
1389
+ * * // enable checking for all file types
1390
+ * !json // except for json
1391
+ * ```
1392
+ * @title Enable File Types
1393
+ * @scope resource
1394
+ * @uniqueItems true
1395
+ */
1393
1396
  enableFiletypes?: LanguageIdSingle[];
1394
1397
  /**
1395
- * Enable / Disable checking file types (languageIds).
1396
- *
1397
- * This setting replaces: {@link Settings.enabledLanguageIds} and {@link Settings.enableFiletypes}.
1398
- *
1399
- * A Value of:
1400
- * - `true` - enable checking for the file type
1401
- * - `false` - disable checking for the file type
1402
- *
1403
- * A file type of `*` is a wildcard that enables all file types.
1404
- *
1405
- * **Example: enable all file types**
1406
- *
1407
- * | File Type | Enabled | Comment |
1408
- * | --------- | ------- | ------- |
1409
- * | `*` | `true` | Enable all file types. |
1410
- * | `json` | `false` | Disable checking for json files. |
1411
- *
1412
- * @title Enabled File Types to Check
1413
- * @since 8.8.1
1414
- */
1398
+ * Enable / Disable checking file types (languageIds).
1399
+ *
1400
+ * This setting replaces: {@link Settings.enabledLanguageIds} and {@link Settings.enableFiletypes}.
1401
+ *
1402
+ * A Value of:
1403
+ * - `true` - enable checking for the file type
1404
+ * - `false` - disable checking for the file type
1405
+ *
1406
+ * A file type of `*` is a wildcard that enables all file types.
1407
+ *
1408
+ * **Example: enable all file types**
1409
+ *
1410
+ * | File Type | Enabled | Comment |
1411
+ * | --------- | ------- | ------- |
1412
+ * | `*` | `true` | Enable all file types. |
1413
+ * | `json` | `false` | Disable checking for json files. |
1414
+ *
1415
+ * @title Enabled File Types to Check
1416
+ * @since 8.8.1
1417
+ */
1415
1418
  enabledFileTypes?: Record<string, boolean>;
1416
1419
  }
1417
1420
  interface Settings extends ReportingConfiguration, BaseSetting, PnPSettings, SpellCheckerExtensionSettings {
1418
1421
  /**
1419
- * Current active spelling language. This specifies the language locale to use in choosing the
1420
- * general dictionary.
1421
- *
1422
- * For example:
1423
- *
1424
- * - "en-GB" for British English.
1425
- * - "en,nl" to enable both English and Dutch.
1426
- *
1427
- * @default "en"
1428
- */
1422
+ * Current active spelling language. This specifies the language locale to use in choosing the
1423
+ * general dictionary.
1424
+ *
1425
+ * For example:
1426
+ *
1427
+ * - "en-GB" for British English.
1428
+ * - "en,nl" to enable both English and Dutch.
1429
+ *
1430
+ * @default "en"
1431
+ */
1429
1432
  language?: LocaleId;
1430
1433
  /**
1431
- * Additional settings for individual languages.
1432
- *
1433
- * See [Language Settings](https://cspell.org/configuration/language-settings/) for more details.
1434
- *
1435
- */
1434
+ * Additional settings for individual languages.
1435
+ *
1436
+ * See [Language Settings](https://cspell.org/configuration/language-settings/) for more details.
1437
+ *
1438
+ */
1436
1439
  languageSettings?: LanguageSetting[];
1437
1440
  /** Forces the spell checker to assume a give language id. Used mainly as an Override. */
1438
1441
  languageId?: MatchingFileType;
1439
1442
  /**
1440
- * By default, the bundled dictionary configurations are loaded. Explicitly setting this to `false`
1441
- * will prevent ALL default configuration from being loaded.
1442
- *
1443
- * @default true
1444
- */
1443
+ * By default, the bundled dictionary configurations are loaded. Explicitly setting this to `false`
1444
+ * will prevent ALL default configuration from being loaded.
1445
+ *
1446
+ * @default true
1447
+ */
1445
1448
  loadDefaultConfiguration?: boolean;
1446
1449
  /**
1447
- * The Maximum size of a file to spell check. This is used to prevent spell checking very large files.
1448
- *
1449
- * The value can be number or a string formatted `<number>[units]`, number with optional units.
1450
- *
1451
- * Supported units:
1452
- *
1453
- * - K, KB - value * 1024
1454
- * - M, MB - value * 2^20
1455
- * - G, GB - value * 2^30
1456
- *
1457
- * Special values:
1458
- * - `0` - has the effect of removing the limit.
1459
- *
1460
- * Examples:
1461
- * - `1000000` - 1 million bytes
1462
- * - `1000K` or `1000KB` - 1 thousand kilobytes
1463
- * - `0.5M` or `0.5MB` - 0.5 megabytes
1464
- *
1465
- * default: no limit
1466
- * @since 9.4.0
1467
- */
1450
+ * The Maximum size of a file to spell check. This is used to prevent spell checking very large files.
1451
+ *
1452
+ * The value can be number or a string formatted `<number>[units]`, number with optional units.
1453
+ *
1454
+ * Supported units:
1455
+ *
1456
+ * - K, KB - value * 1024
1457
+ * - M, MB - value * 2^20
1458
+ * - G, GB - value * 2^30
1459
+ *
1460
+ * Special values:
1461
+ * - `0` - has the effect of removing the limit.
1462
+ *
1463
+ * Examples:
1464
+ * - `1000000` - 1 million bytes
1465
+ * - `1000K` or `1000KB` - 1 thousand kilobytes
1466
+ * - `0.5M` or `0.5MB` - 0.5 megabytes
1467
+ *
1468
+ * default: no limit
1469
+ * @since 9.4.0
1470
+ */
1468
1471
  maxFileSize?: number | string | undefined;
1469
1472
  }
1470
1473
  /**
1471
- * Plug N Play settings to support package systems like Yarn 2.
1472
- */
1474
+ * Plug N Play settings to support package systems like Yarn 2.
1475
+ */
1473
1476
  interface PnPSettings {
1474
1477
  /**
1475
- * Packages managers like Yarn 2 use a `.pnp.cjs` file to assist in loading
1476
- * packages stored in the repository.
1477
- *
1478
- * When true, the spell checker will search up the directory structure for the existence
1479
- * of a PnP file and load it.
1480
- *
1481
- * @default false
1482
- */
1478
+ * Packages managers like Yarn 2 use a `.pnp.cjs` file to assist in loading
1479
+ * packages stored in the repository.
1480
+ *
1481
+ * When true, the spell checker will search up the directory structure for the existence
1482
+ * of a PnP file and load it.
1483
+ *
1484
+ * @default false
1485
+ */
1483
1486
  usePnP?: boolean;
1484
1487
  /**
1485
- * The PnP files to search for. Note: `.mjs` files are not currently supported.
1486
- *
1487
- * @default [".pnp.js", ".pnp.cjs"]
1488
- */
1488
+ * The PnP files to search for. Note: `.mjs` files are not currently supported.
1489
+ *
1490
+ * @default [".pnp.js", ".pnp.cjs"]
1491
+ */
1489
1492
  pnpFiles?: string[];
1490
1493
  }
1491
1494
  /**
1492
- * The Strategy to use to detect if a file has changed.
1493
- * - `content` - uses a hash of the file content to check file changes (slower - more accurate).
1494
- * - `metadata` - uses the file system timestamp and size to detect changes (fastest, may not work in CI).
1495
- * @default 'content'
1496
- */
1495
+ * The Strategy to use to detect if a file has changed.
1496
+ * - `content` - uses a hash of the file content to check file changes (slower - more accurate).
1497
+ * - `metadata` - uses the file system timestamp and size to detect changes (fastest, may not work in CI).
1498
+ * @default 'content'
1499
+ */
1497
1500
  type CacheStrategy = "content" | "metadata";
1498
1501
  type CacheFormat = "legacy" | "universal";
1499
1502
  interface CacheSettings {
1500
1503
  /**
1501
- * Store the results of processed files in order to only operate on the changed ones.
1502
- * @default false
1503
- */
1504
+ * Store the results of processed files in order to only operate on the changed ones.
1505
+ * @default false
1506
+ */
1504
1507
  useCache?: boolean;
1505
1508
  /**
1506
- * Path to the cache location. Can be a file or a directory.
1507
- * If none specified `.cspellcache` will be used.
1508
- * Relative paths are relative to the config file in which it
1509
- * is defined.
1510
- *
1511
- * A prefix of `${cwd}` is replaced with the current working directory.
1512
- */
1509
+ * Path to the cache location. Can be a file or a directory.
1510
+ * If none specified `.cspellcache` will be used.
1511
+ * Relative paths are relative to the config file in which it
1512
+ * is defined.
1513
+ *
1514
+ * A prefix of `${cwd}` is replaced with the current working directory.
1515
+ */
1513
1516
  cacheLocation?: FSPathResolvable;
1514
1517
  /**
1515
- * Strategy to use for detecting changed files, default: metadata
1516
- * @default 'metadata'
1517
- */
1518
+ * Strategy to use for detecting changed files, default: metadata
1519
+ * @default 'metadata'
1520
+ */
1518
1521
  cacheStrategy?: CacheStrategy;
1519
1522
  /**
1520
- * Format of the cache file.
1521
- * - `legacy` - use absolute paths in the cache file
1522
- * - `universal` - use a sharable format.
1523
- * @default 'universal'
1524
- */
1523
+ * Format of the cache file.
1524
+ * - `legacy` - use absolute paths in the cache file
1525
+ * - `universal` - use a sharable format.
1526
+ * @default 'universal'
1527
+ */
1525
1528
  cacheFormat?: CacheFormat | undefined;
1526
1529
  }
1527
1530
  /**
1528
- * These are settings only used by the command line application.
1529
- */
1531
+ * These are settings only used by the command line application.
1532
+ */
1530
1533
  interface CommandLineSettings {
1531
1534
  /**
1532
- * Define cache settings.
1533
- */
1535
+ * Define cache settings.
1536
+ */
1534
1537
  cache?: CacheSettings;
1535
1538
  /**
1536
- * Exit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks)
1537
- * @default false
1538
- */
1539
+ * Exit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks)
1540
+ * @default false
1541
+ */
1539
1542
  failFast?: boolean;
1540
1543
  }
1541
1544
  /**
1542
- * To prevent the unwanted execution of untrusted code, WorkspaceTrustSettings
1543
- * are use to set the trust levels.
1544
- *
1545
- * Trust setting have an impact on both `cspell.config.js` files and on `.pnp.js` files.
1546
- * In an untrusted location, these files will NOT be used.
1547
- *
1548
- * This will also prevent any associated plugins from being loaded.
1549
- */
1545
+ * To prevent the unwanted execution of untrusted code, WorkspaceTrustSettings
1546
+ * are use to set the trust levels.
1547
+ *
1548
+ * Trust setting have an impact on both `cspell.config.js` files and on `.pnp.js` files.
1549
+ * In an untrusted location, these files will NOT be used.
1550
+ *
1551
+ * This will also prevent any associated plugins from being loaded.
1552
+ */
1550
1553
  interface WorkspaceTrustSettings {
1551
1554
  /**
1552
- * Glob patterns of locations that contain ALWAYS trusted files.
1553
- */
1555
+ * Glob patterns of locations that contain ALWAYS trusted files.
1556
+ */
1554
1557
  trustedFiles?: Glob[];
1555
1558
  /**
1556
- * Glob patterns of locations that contain NEVER trusted files.
1557
- */
1559
+ * Glob patterns of locations that contain NEVER trusted files.
1560
+ */
1558
1561
  untrustedFiles?: Glob[];
1559
1562
  /**
1560
- * Sets the default trust level.
1561
- * @default "trusted"
1562
- */
1563
+ * Sets the default trust level.
1564
+ * @default "trusted"
1565
+ */
1563
1566
  trustLevel?: TrustLevel;
1564
1567
  }
1565
1568
  /**
1566
- * VS Code Spell Checker Settings.
1567
- * To be Removed.
1568
- * @deprecated true
1569
- */
1569
+ * VS Code Spell Checker Settings.
1570
+ * To be Removed.
1571
+ * @deprecated true
1572
+ */
1570
1573
  interface LegacySettings {
1571
1574
  /**
1572
- * Show status.
1573
- * @deprecated true
1574
- */
1575
+ * Show status.
1576
+ * @deprecated true
1577
+ */
1575
1578
  showStatus?: boolean;
1576
1579
  /**
1577
- * Delay in ms after a document has changed before checking it for spelling errors.
1578
- * @deprecated true
1579
- */
1580
+ * Delay in ms after a document has changed before checking it for spelling errors.
1581
+ * @deprecated true
1582
+ */
1580
1583
  spellCheckDelayMs?: number;
1581
1584
  }
1582
1585
  interface OverrideSettings extends Settings, OverrideFilterFields {
@@ -1597,134 +1600,134 @@ interface BaseSetting extends InlineDictionary, ExperimentalBaseSettings, Unknow
1597
1600
  /** Optional description of configuration. */
1598
1601
  description?: string;
1599
1602
  /**
1600
- * Is the spell checker enabled.
1601
- * @default true
1602
- */
1603
+ * Is the spell checker enabled.
1604
+ * @default true
1605
+ */
1603
1606
  enabled?: boolean;
1604
1607
  /**
1605
- * True to enable compound word checking.
1606
- *
1607
- * @default false
1608
- */
1608
+ * True to enable compound word checking.
1609
+ *
1610
+ * @default false
1611
+ */
1609
1612
  allowCompoundWords?: boolean;
1610
1613
  /**
1611
- * Determines if words must match case and accent rules.
1612
- *
1613
- * See [Case Sensitivity](https://cspell.org/docs/case-sensitive/) for more details.
1614
- *
1615
- * - `false` - Case is ignored and accents can be missing on the entire word.
1616
- * Incorrect accents or partially missing accents will be marked as incorrect.
1617
- * - `true` - Case and accents are enforced.
1618
- *
1619
- * @default false
1620
- */
1614
+ * Determines if words must match case and accent rules.
1615
+ *
1616
+ * See [Case Sensitivity](https://cspell.org/docs/case-sensitive/) for more details.
1617
+ *
1618
+ * - `false` - Case is ignored and accents can be missing on the entire word.
1619
+ * Incorrect accents or partially missing accents will be marked as incorrect.
1620
+ * - `true` - Case and accents are enforced.
1621
+ *
1622
+ * @default false
1623
+ */
1621
1624
  caseSensitive?: boolean;
1622
1625
  /**
1623
- * Define additional available dictionaries.
1624
- *
1625
- * For example, you can use the following to add a custom dictionary:
1626
- *
1627
- * ```json
1628
- * "dictionaryDefinitions": [
1629
- * { "name": "custom-words", "path": "./custom-words.txt"}
1630
- * ],
1631
- * "dictionaries": ["custom-words"]
1632
- * ```
1633
- */
1626
+ * Define additional available dictionaries.
1627
+ *
1628
+ * For example, you can use the following to add a custom dictionary:
1629
+ *
1630
+ * ```json
1631
+ * "dictionaryDefinitions": [
1632
+ * { "name": "custom-words", "path": "./custom-words.txt"}
1633
+ * ],
1634
+ * "dictionaries": ["custom-words"]
1635
+ * ```
1636
+ */
1634
1637
  dictionaryDefinitions?: DictionaryDefinition[];
1635
1638
  /**
1636
- * Optional list of dictionaries to use. Each entry should match the name of the dictionary.
1637
- *
1638
- * To remove a dictionary from the list, add `!` before the name.
1639
- *
1640
- * For example, `!typescript` will turn off the dictionary with the name `typescript`.
1641
- *
1642
- * See the [Dictionaries](https://cspell.org/docs/dictionaries/)
1643
- * and [Custom Dictionaries](https://cspell.org/docs/dictionaries/custom-dictionaries/) for more details.
1644
- */
1639
+ * Optional list of dictionaries to use. Each entry should match the name of the dictionary.
1640
+ *
1641
+ * To remove a dictionary from the list, add `!` before the name.
1642
+ *
1643
+ * For example, `!typescript` will turn off the dictionary with the name `typescript`.
1644
+ *
1645
+ * See the [Dictionaries](https://cspell.org/docs/dictionaries/)
1646
+ * and [Custom Dictionaries](https://cspell.org/docs/dictionaries/custom-dictionaries/) for more details.
1647
+ */
1645
1648
  dictionaries?: DictionaryReference[];
1646
1649
  /**
1647
- * Optional list of dictionaries that will not be used for suggestions.
1648
- * Words in these dictionaries are considered correct, but will not be
1649
- * used when making spell correction suggestions.
1650
- *
1651
- * Note: if a word is suggested by another dictionary, but found in
1652
- * one of these dictionaries, it will be removed from the set of
1653
- * possible suggestions.
1654
- */
1650
+ * Optional list of dictionaries that will not be used for suggestions.
1651
+ * Words in these dictionaries are considered correct, but will not be
1652
+ * used when making spell correction suggestions.
1653
+ *
1654
+ * Note: if a word is suggested by another dictionary, but found in
1655
+ * one of these dictionaries, it will be removed from the set of
1656
+ * possible suggestions.
1657
+ */
1655
1658
  noSuggestDictionaries?: DictionaryReference[];
1656
1659
  /**
1657
- * List of regular expression patterns or pattern names to exclude from spell checking.
1658
- *
1659
- * Example: `["href"]` - to exclude html href pattern.
1660
- *
1661
- * Regular expressions use JavaScript regular expression syntax.
1662
- *
1663
- * Example: to ignore ALL-CAPS words
1664
- *
1665
- * JSON
1666
- * ```json
1667
- * "ignoreRegExpList": ["/\\b[A-Z]+\\b/g"]
1668
- * ```
1669
- *
1670
- * YAML
1671
- * ```yaml
1672
- * ignoreRegExpList:
1673
- * - >-
1674
- * /\b[A-Z]+\b/g
1675
- * ```
1676
- *
1677
- * By default, several patterns are excluded. See
1678
- * [Configuration](https://cspell.org/configuration/patterns) for more details.
1679
- *
1680
- * While you can create your own patterns, you can also leverage several patterns that are
1681
- * [built-in to CSpell](https://cspell.org/types/cspell-types/types/PredefinedPatterns.html).
1682
- */
1660
+ * List of regular expression patterns or pattern names to exclude from spell checking.
1661
+ *
1662
+ * Example: `["href"]` - to exclude html href pattern.
1663
+ *
1664
+ * Regular expressions use JavaScript regular expression syntax.
1665
+ *
1666
+ * Example: to ignore ALL-CAPS words
1667
+ *
1668
+ * JSON
1669
+ * ```json
1670
+ * "ignoreRegExpList": ["/\\b[A-Z]+\\b/g"]
1671
+ * ```
1672
+ *
1673
+ * YAML
1674
+ * ```yaml
1675
+ * ignoreRegExpList:
1676
+ * - >-
1677
+ * /\b[A-Z]+\b/g
1678
+ * ```
1679
+ *
1680
+ * By default, several patterns are excluded. See
1681
+ * [Configuration](https://cspell.org/configuration/patterns) for more details.
1682
+ *
1683
+ * While you can create your own patterns, you can also leverage several patterns that are
1684
+ * [built-in to CSpell](https://cspell.org/types/cspell-types/types/PredefinedPatterns.html).
1685
+ */
1683
1686
  ignoreRegExpList?: RegExpPatternList;
1684
1687
  /**
1685
- * List of regular expression patterns or defined pattern names to match for spell checking.
1686
- *
1687
- * If this property is defined, only text matching the included patterns will be checked.
1688
- *
1689
- * While you can create your own patterns, you can also leverage several patterns that are
1690
- * [built-in to CSpell](https://cspell.org/types/cspell-types/types/PredefinedPatterns.html).
1691
- */
1688
+ * List of regular expression patterns or defined pattern names to match for spell checking.
1689
+ *
1690
+ * If this property is defined, only text matching the included patterns will be checked.
1691
+ *
1692
+ * While you can create your own patterns, you can also leverage several patterns that are
1693
+ * [built-in to CSpell](https://cspell.org/types/cspell-types/types/PredefinedPatterns.html).
1694
+ */
1692
1695
  includeRegExpList?: RegExpPatternList;
1693
1696
  /**
1694
- * Defines a list of patterns that can be used with the {@link ignoreRegExpList} and
1695
- * {@link includeRegExpList} options.
1696
- *
1697
- * For example:
1698
- *
1699
- * ```javascript
1700
- * "ignoreRegExpList": ["comments"],
1701
- * "patterns": [
1702
- * {
1703
- * "name": "comment-single-line",
1704
- * "pattern": "/#.*​/g"
1705
- * },
1706
- * {
1707
- * "name": "comment-multi-line",
1708
- * "pattern": "/(?:\\/\\*[\\s\\S]*?\\*\\/)/g"
1709
- * },
1710
- * // You can also combine multiple named patterns into one single named pattern
1711
- * {
1712
- * "name": "comments",
1713
- * "pattern": ["comment-single-line", "comment-multi-line"]
1714
- * }
1715
- * ]
1716
- * ```
1717
- */
1697
+ * Defines a list of patterns that can be used with the {@link ignoreRegExpList} and
1698
+ * {@link includeRegExpList} options.
1699
+ *
1700
+ * For example:
1701
+ *
1702
+ * ```javascript
1703
+ * "ignoreRegExpList": ["comments"],
1704
+ * "patterns": [
1705
+ * {
1706
+ * "name": "comment-single-line",
1707
+ * "pattern": "/#.*​/g"
1708
+ * },
1709
+ * {
1710
+ * "name": "comment-multi-line",
1711
+ * "pattern": "/(?:\\/\\*[\\s\\S]*?\\*\\/)/g"
1712
+ * },
1713
+ * // You can also combine multiple named patterns into one single named pattern
1714
+ * {
1715
+ * "name": "comments",
1716
+ * "pattern": ["comment-single-line", "comment-multi-line"]
1717
+ * }
1718
+ * ]
1719
+ * ```
1720
+ */
1718
1721
  patterns?: RegExpPatternDefinition[];
1719
1722
  /**
1720
- * The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.
1721
- * @since 9.7.0
1722
- */
1723
+ * The set of available substitutions. This is a collection of substitution definitions that can be applied to a document before spell checking.
1724
+ * @since 9.7.0
1725
+ */
1723
1726
  substitutionDefinitions?: SubstitutionDefinitions;
1724
1727
  /**
1725
- * The set of substitutions to apply to a document before spell checking.
1726
- * @since 9.7.0
1727
- */
1728
+ * The set of substitutions to apply to a document before spell checking.
1729
+ * @since 9.7.0
1730
+ */
1728
1731
  substitutions?: Substitutions;
1729
1732
  }
1730
1733
  interface LanguageSetting extends LanguageSettingFilterFields, BaseSetting {}
@@ -1739,10 +1742,10 @@ interface LanguageSettingFilterFieldsDeprecated {
1739
1742
  /** The language id. Ex: `typescript`, `html`, or `php`. `*` -- will match all languages. */
1740
1743
  languageId: MatchingFileType;
1741
1744
  /**
1742
- * Deprecated - The locale filter, matches against the language. This can be a comma separated list. `*` will match all locales.
1743
- * @deprecated true
1744
- * @deprecationMessage Use `locale` instead.
1745
- */
1745
+ * Deprecated - The locale filter, matches against the language. This can be a comma separated list. `*` will match all locales.
1746
+ * @deprecated true
1747
+ * @deprecationMessage Use `locale` instead.
1748
+ */
1746
1749
  local?: LocaleId | LocaleId[];
1747
1750
  }
1748
1751
  /** @hidden */
@@ -1758,94 +1761,94 @@ type RegExpPatternList = PatternRef[];
1758
1761
  /** This is a written language locale like: `en`, `en-GB`, `fr`, `es`, `de` or `en,fr` for both English and French */
1759
1762
  type LocaleId = string;
1760
1763
  /**
1761
- * Configuration File Version.
1762
- */
1764
+ * Configuration File Version.
1765
+ */
1763
1766
  type VersionLatest = "0.2";
1764
1767
  /**
1765
- * Legacy Configuration File Versions.
1766
- * @deprecated true
1767
- * @deprecationMessage Use `0.2` instead.
1768
- */
1768
+ * Legacy Configuration File Versions.
1769
+ * @deprecated true
1770
+ * @deprecationMessage Use `0.2` instead.
1771
+ */
1769
1772
  type VersionLegacy = "0.1";
1770
1773
  type Version = VersionLatest | VersionLegacy;
1771
1774
  /**
1772
- * @deprecated true
1773
- * @deprecationMessage Use `LocaleId` instead.
1774
- */
1775
+ * @deprecated true
1776
+ * @deprecationMessage Use `LocaleId` instead.
1777
+ */
1775
1778
  type LocalId = LocaleId;
1776
1779
  /** These are glob expressions. */
1777
1780
  type Glob = SimpleGlob | GlobDef;
1778
1781
  /** Simple Glob string, the root will be globRoot. */
1779
1782
  type SimpleGlob = string;
1780
1783
  /**
1781
- * Used to define fully qualified glob patterns.
1782
- * It is currently hidden to make the json-schema a bit easier to use
1783
- * when crafting cspell.json files by hand.
1784
- * @hidden
1785
- */
1784
+ * Used to define fully qualified glob patterns.
1785
+ * It is currently hidden to make the json-schema a bit easier to use
1786
+ * when crafting cspell.json files by hand.
1787
+ * @hidden
1788
+ */
1786
1789
  interface GlobDef {
1787
1790
  /** Glob pattern to match. */
1788
1791
  glob: string;
1789
1792
  /** Optional root to use when matching the glob. Defaults to current working dir. */
1790
1793
  root?: string;
1791
1794
  /**
1792
- * Optional source of the glob, used when merging settings to determine the origin.
1793
- * @hidden
1794
- */
1795
+ * Optional source of the glob, used when merging settings to determine the origin.
1796
+ * @hidden
1797
+ */
1795
1798
  source?: string;
1796
1799
  }
1797
1800
  /**
1798
- * A file type:
1799
- * - `*` - will match ALL file types.
1800
- * - `typescript`, `cpp`, `json`, etc.
1801
- * @pattern ^(!?[-\w_\s]+)|(\*)$
1802
- */
1801
+ * A file type:
1802
+ * - `*` - will match ALL file types.
1803
+ * - `typescript`, `cpp`, `json`, etc.
1804
+ * @pattern ^(!?[-\w_\s]+)|(\*)$
1805
+ */
1803
1806
  type LanguageIdSingle = string;
1804
1807
  /**
1805
- * A single string with a comma separated list of file types:
1806
- * - `typescript,cpp`
1807
- * - `json,jsonc,yaml`
1808
- * - etc.
1809
- * @pattern ^([-\w_\s]+)(,[-\w_\s]+)*$
1810
- */
1808
+ * A single string with a comma separated list of file types:
1809
+ * - `typescript,cpp`
1810
+ * - `json,jsonc,yaml`
1811
+ * - etc.
1812
+ * @pattern ^([-\w_\s]+)(,[-\w_\s]+)*$
1813
+ */
1811
1814
  type LanguageIdMultiple = string;
1812
1815
  /**
1813
- * A Negative File Type used to exclude files of that type.
1814
- * - `!typescript` - will exclude typescript files.
1815
- * - `!cpp,!json` - will exclude cpp and json files.
1816
- * - `!typescript,javascript` - will exclude typescript files and include javascript files.
1817
- * @pattern ^(![-\w_\s]+)(,!?[-\w_\s]+)*$
1818
- */
1816
+ * A Negative File Type used to exclude files of that type.
1817
+ * - `!typescript` - will exclude typescript files.
1818
+ * - `!cpp,!json` - will exclude cpp and json files.
1819
+ * - `!typescript,javascript` - will exclude typescript files and include javascript files.
1820
+ * @pattern ^(![-\w_\s]+)(,!?[-\w_\s]+)*$
1821
+ */
1819
1822
  type LanguageIdMultipleNeg = string;
1820
1823
  type LanguageId = LanguageIdSingle | LanguageIdMultiple | LanguageIdMultipleNeg;
1821
1824
  type MatchingFileType = LanguageId | LanguageId[];
1822
1825
  /**
1823
- * A File System Path. Relative paths are relative to the configuration file.
1824
- */
1826
+ * A File System Path. Relative paths are relative to the configuration file.
1827
+ */
1825
1828
  type FsPath = string;
1826
1829
  /**
1827
- * A File System Path.
1828
- *
1829
- * Special Properties:
1830
- * - `${cwd}` prefix - will be replaced with the current working directory.
1831
- * - Relative paths are relative to the configuration file.
1832
- */
1830
+ * A File System Path.
1831
+ *
1832
+ * Special Properties:
1833
+ * - `${cwd}` prefix - will be replaced with the current working directory.
1834
+ * - Relative paths are relative to the configuration file.
1835
+ */
1833
1836
  type FSPathResolvable = FsPath;
1834
1837
  /** Trust Security Level. */
1835
1838
  type TrustLevel = "trusted" | "untrusted";
1836
1839
  interface RegExpPatternDefinition {
1837
1840
  /**
1838
- * Pattern name, used as an identifier in ignoreRegExpList and includeRegExpList.
1839
- * It is possible to redefine one of the predefined patterns to override its value.
1840
- */
1841
+ * Pattern name, used as an identifier in ignoreRegExpList and includeRegExpList.
1842
+ * It is possible to redefine one of the predefined patterns to override its value.
1843
+ */
1841
1844
  name: PatternId;
1842
1845
  /**
1843
- * RegExp pattern or array of RegExp patterns.
1844
- */
1846
+ * RegExp pattern or array of RegExp patterns.
1847
+ */
1845
1848
  pattern: Pattern | Pattern[];
1846
1849
  /**
1847
- * Description of the pattern.
1848
- */
1850
+ * Description of the pattern.
1851
+ */
1849
1852
  description?: string | undefined;
1850
1853
  }
1851
1854
  type CSpellUserSettingsWithComments = CSpellUserSettings;
@@ -1891,102 +1894,102 @@ interface BaseSource {
1891
1894
  fileSource?: CSpellSettings | undefined;
1892
1895
  }
1893
1896
  /**
1894
- * The module or path to the the reporter to load.
1895
- */
1897
+ * The module or path to the the reporter to load.
1898
+ */
1896
1899
  type ReporterModuleName = string;
1897
1900
  /**
1898
- * Options to send to the reporter. These are defined by the reporter.
1899
- */
1901
+ * Options to send to the reporter. These are defined by the reporter.
1902
+ */
1900
1903
  type ReporterOptions = Serializable;
1901
1904
  /**
1902
- * Declare a reporter to use.
1903
- *
1904
- * `default` - is a special name for the default cli reporter.
1905
- *
1906
- * Examples:
1907
- * - `"default"` - to use the default reporter
1908
- * - `"@cspell/cspell-json-reporter"` - use the cspell JSON reporter.
1909
- * - `["@cspell/cspell-json-reporter", { "outFile": "out.json" }]`
1910
- */
1905
+ * Declare a reporter to use.
1906
+ *
1907
+ * `default` - is a special name for the default cli reporter.
1908
+ *
1909
+ * Examples:
1910
+ * - `"default"` - to use the default reporter
1911
+ * - `"@cspell/cspell-json-reporter"` - use the cspell JSON reporter.
1912
+ * - `["@cspell/cspell-json-reporter", { "outFile": "out.json" }]`
1913
+ */
1911
1914
  type ReporterSettings = ReporterModuleName | [name: ReporterModuleName] | [name: ReporterModuleName, options: ReporterOptions];
1912
1915
  /**
1913
- * Experimental Configuration / Options
1914
- *
1915
- * This Configuration is subject to change without warning.
1916
- * @experimental
1917
- * @hidden
1918
- */
1916
+ * Experimental Configuration / Options
1917
+ *
1918
+ * This Configuration is subject to change without warning.
1919
+ * @experimental
1920
+ * @hidden
1921
+ */
1919
1922
  interface ExperimentalFileSettings {
1920
1923
  /**
1921
- * Future Plugin support
1922
- * @experimental
1923
- * @since 6.2.0
1924
- */
1924
+ * Future Plugin support
1925
+ * @experimental
1926
+ * @since 6.2.0
1927
+ */
1925
1928
  plugins?: Plugin[];
1926
1929
  }
1927
1930
  /**
1928
- * Extends CSpellSettings with {@link ExperimentalFileSettings}
1929
- * @experimental
1930
- * @hidden
1931
- */
1931
+ * Extends CSpellSettings with {@link ExperimentalFileSettings}
1932
+ * @experimental
1933
+ * @hidden
1934
+ */
1932
1935
  interface AdvancedCSpellSettings extends CSpellSettings, ExperimentalFileSettings {}
1933
1936
  /**
1934
- * Experimental Configuration / Options
1935
- *
1936
- * This Configuration is subject to change without warning.
1937
- * @experimental
1938
- * @hidden
1939
- */
1937
+ * Experimental Configuration / Options
1938
+ *
1939
+ * This Configuration is subject to change without warning.
1940
+ * @experimental
1941
+ * @hidden
1942
+ */
1940
1943
  interface ExperimentalBaseSettings {
1941
1944
  /**
1942
- * Parser to use for the file content
1943
- * @experimental
1944
- * @since 6.2.0
1945
- */
1945
+ * Parser to use for the file content
1946
+ * @experimental
1947
+ * @since 6.2.0
1948
+ */
1946
1949
  parser?: ParserName;
1947
1950
  }
1948
1951
  /**
1949
- * Plugin API
1950
- * @experimental
1951
- * @since 6.2.0
1952
- */
1952
+ * Plugin API
1953
+ * @experimental
1954
+ * @since 6.2.0
1955
+ */
1953
1956
  interface Plugin {
1954
1957
  parsers?: Parser[];
1955
1958
  }
1956
1959
  /**
1957
- * Semantic Version Predicate
1958
- *
1959
- * Examples:
1960
- * - `>=8`
1961
- */
1960
+ * Semantic Version Predicate
1961
+ *
1962
+ * Examples:
1963
+ * - `>=8`
1964
+ */
1962
1965
  type SemVersionPredicate = string;
1963
1966
  /**
1964
- * Engine version predicates.
1965
- *
1966
- * This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.
1967
- *
1968
- * @since 9.6.3
1969
- */
1967
+ * Engine version predicates.
1968
+ *
1969
+ * This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.
1970
+ *
1971
+ * @since 9.6.3
1972
+ */
1970
1973
  interface CompatibleEngineVersions {
1971
1974
  /**
1972
- * CSpell version predicate.
1973
- * @since 9.6.3
1974
- */
1975
+ * CSpell version predicate.
1976
+ * @since 9.6.3
1977
+ */
1975
1978
  cspell?: SemVersionPredicate | undefined;
1976
1979
  /**
1977
- * The VSCode Spell Checker version predicate.
1978
- * @since 9.6.3
1979
- */
1980
+ * The VSCode Spell Checker version predicate.
1981
+ * @since 9.6.3
1982
+ */
1980
1983
  "code-spell-checker"?: SemVersionPredicate | undefined;
1981
1984
  /**
1982
- * Other engine version predicates.
1983
- */
1985
+ * Other engine version predicates.
1986
+ */
1984
1987
  [engine: string]: SemVersionPredicate | undefined;
1985
1988
  }
1986
1989
  //#endregion
1987
1990
  //#region src/configFields.d.ts
1988
1991
  type ConfigKeys = Exclude<keyof CSpellUserSettings, "$schema" | "version" | "id">;
1989
- type CSpellUserSettingsFields = { [key in ConfigKeys]: key };
1992
+ type CSpellUserSettingsFields = { [key in ConfigKeys]: key; };
1990
1993
  declare const ConfigFields: CSpellUserSettingsFields;
1991
1994
  //#endregion
1992
1995
  //#region src/defaultConfigSettings.d.ts