@cspell/cspell-types 5.12.6 → 5.13.3
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/cspell.schema.json
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"DictionaryDefinitionAlternate": {
|
|
33
33
|
"additionalProperties": false,
|
|
34
|
+
"deprecated": true,
|
|
34
35
|
"deprecationMessage": "Use `DictionaryDefinitionPreferred`",
|
|
35
36
|
"description": "Only for legacy dictionary definitions",
|
|
36
37
|
"properties": {
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
},
|
|
41
42
|
"file": {
|
|
42
43
|
"$ref": "#/definitions/DictionaryPath",
|
|
44
|
+
"deprecated": true,
|
|
43
45
|
"deprecationMessage": "Use `path` instead.",
|
|
44
46
|
"description": "Path to the file, only for legacy dictionary definitions"
|
|
45
47
|
},
|
|
@@ -332,6 +334,7 @@
|
|
|
332
334
|
"type": "array"
|
|
333
335
|
}
|
|
334
336
|
],
|
|
337
|
+
"deprecated": true,
|
|
335
338
|
"deprecationMessage": "Use `locale` instead",
|
|
336
339
|
"description": "Deprecated - The locale filter, matches against the language. This can be a comma separated list. \"*\" will match all locales."
|
|
337
340
|
},
|
|
@@ -690,8 +693,7 @@
|
|
|
690
693
|
{
|
|
691
694
|
"type": "string"
|
|
692
695
|
},
|
|
693
|
-
{
|
|
694
|
-
}
|
|
696
|
+
{}
|
|
695
697
|
],
|
|
696
698
|
"maxItems": 2,
|
|
697
699
|
"minItems": 2,
|
|
@@ -721,6 +723,7 @@
|
|
|
721
723
|
},
|
|
722
724
|
"VersionLegacy": {
|
|
723
725
|
"const": "0.1",
|
|
726
|
+
"deprecated": true,
|
|
724
727
|
"deprecationMessage": "Use `0.2`",
|
|
725
728
|
"description": "Legacy Configuration File Versions",
|
|
726
729
|
"type": "string"
|
|
@@ -768,6 +771,11 @@
|
|
|
768
771
|
"type": "array",
|
|
769
772
|
"uniqueItems": true
|
|
770
773
|
},
|
|
774
|
+
"enableGlobDot": {
|
|
775
|
+
"default": false,
|
|
776
|
+
"description": "Enable scanning files and directories beginning with `.` (period). By default, CSpell does not scan `hidden` files.",
|
|
777
|
+
"type": "boolean"
|
|
778
|
+
},
|
|
771
779
|
"enabled": {
|
|
772
780
|
"default": true,
|
|
773
781
|
"description": "Is the spell checker enabled",
|
|
@@ -942,10 +950,12 @@
|
|
|
942
950
|
"type": "array"
|
|
943
951
|
},
|
|
944
952
|
"showStatus": {
|
|
953
|
+
"deprecated": true,
|
|
945
954
|
"description": "Show status",
|
|
946
955
|
"type": "boolean"
|
|
947
956
|
},
|
|
948
957
|
"spellCheckDelayMs": {
|
|
958
|
+
"deprecated": true,
|
|
949
959
|
"description": "Delay in ms after a document has changed before checking it for spelling errors.",
|
|
950
960
|
"type": "number"
|
|
951
961
|
},
|
|
@@ -49,6 +49,13 @@ export interface FileSettings extends ExtendableSettings {
|
|
|
49
49
|
* Glob patterns are relative to the `globRoot` of the configuration file that defines them.
|
|
50
50
|
*/
|
|
51
51
|
files?: Glob[];
|
|
52
|
+
/**
|
|
53
|
+
* Enable scanning files and directories beginning with `.` (period).
|
|
54
|
+
* By default, CSpell does not scan `hidden` files.
|
|
55
|
+
*
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
enableGlobDot?: boolean;
|
|
52
59
|
/**
|
|
53
60
|
* Glob patterns of files to be ignored
|
|
54
61
|
* Glob patterns are relative to the `globRoot` of the configuration file that defines them.
|
|
@@ -204,17 +211,17 @@ export interface WorkspaceTrustSettings {
|
|
|
204
211
|
/**
|
|
205
212
|
* VS Code Spell Checker Settings
|
|
206
213
|
* To be Removed
|
|
207
|
-
* @deprecated
|
|
214
|
+
* @deprecated true
|
|
208
215
|
*/
|
|
209
216
|
export interface LegacySettings {
|
|
210
217
|
/**
|
|
211
218
|
* Show status
|
|
212
|
-
* @deprecated
|
|
219
|
+
* @deprecated true
|
|
213
220
|
*/
|
|
214
221
|
showStatus?: boolean;
|
|
215
222
|
/**
|
|
216
223
|
* Delay in ms after a document has changed before checking it for spelling errors.
|
|
217
|
-
* @deprecated
|
|
224
|
+
* @deprecated true
|
|
218
225
|
*/
|
|
219
226
|
spellCheckDelayMs?: number;
|
|
220
227
|
}
|
|
@@ -340,7 +347,7 @@ export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase
|
|
|
340
347
|
path: DictionaryPath;
|
|
341
348
|
/**
|
|
342
349
|
* Only for legacy dictionary definitions
|
|
343
|
-
* @deprecated
|
|
350
|
+
* @deprecated true
|
|
344
351
|
* @deprecationMessage Use `path` instead.
|
|
345
352
|
* @hidden
|
|
346
353
|
*/
|
|
@@ -348,7 +355,7 @@ export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase
|
|
|
348
355
|
}
|
|
349
356
|
/**
|
|
350
357
|
* Only for legacy dictionary definitions
|
|
351
|
-
* @deprecated
|
|
358
|
+
* @deprecated true
|
|
352
359
|
* @deprecationMessage Use `DictionaryDefinitionPreferred`
|
|
353
360
|
*/
|
|
354
361
|
export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase {
|
|
@@ -356,13 +363,13 @@ export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase
|
|
|
356
363
|
path?: undefined;
|
|
357
364
|
/**
|
|
358
365
|
* Path to the file, only for legacy dictionary definitions
|
|
359
|
-
* @deprecated
|
|
366
|
+
* @deprecated true
|
|
360
367
|
* @deprecationMessage Use `path` instead.
|
|
361
368
|
*/
|
|
362
369
|
file: DictionaryPath;
|
|
363
370
|
}
|
|
364
371
|
/**
|
|
365
|
-
* @deprecated
|
|
372
|
+
* @deprecated true
|
|
366
373
|
* @hidden
|
|
367
374
|
*/
|
|
368
375
|
export interface DictionaryDefinitionLegacy extends DictionaryDefinitionBase {
|
|
@@ -370,7 +377,7 @@ export interface DictionaryDefinitionLegacy extends DictionaryDefinitionBase {
|
|
|
370
377
|
path?: FsPath;
|
|
371
378
|
/**
|
|
372
379
|
* File name
|
|
373
|
-
* @deprecated
|
|
380
|
+
* @deprecated true
|
|
374
381
|
* @deprecationMessage Use path instead.
|
|
375
382
|
*/
|
|
376
383
|
file: FsPath;
|
|
@@ -424,7 +431,7 @@ export interface LanguageSettingFilterFieldsDeprecated {
|
|
|
424
431
|
languageId: LanguageId | LanguageIdSingle[];
|
|
425
432
|
/**
|
|
426
433
|
* Deprecated - The locale filter, matches against the language. This can be a comma separated list. "*" will match all locales.
|
|
427
|
-
* @deprecated
|
|
434
|
+
* @deprecated true
|
|
428
435
|
* @deprecationMessage Use `locale` instead
|
|
429
436
|
*/
|
|
430
437
|
local?: LocaleId | LocaleId[];
|
|
@@ -487,13 +494,13 @@ export declare type LocaleId = string;
|
|
|
487
494
|
export declare type VersionLatest = '0.2';
|
|
488
495
|
/**
|
|
489
496
|
* Legacy Configuration File Versions
|
|
490
|
-
* @deprecated
|
|
497
|
+
* @deprecated true
|
|
491
498
|
* @deprecationMessage Use `0.2`
|
|
492
499
|
*/
|
|
493
500
|
export declare type VersionLegacy = '0.1';
|
|
494
501
|
export declare type Version = VersionLatest | VersionLegacy;
|
|
495
502
|
/**
|
|
496
|
-
* @deprecated
|
|
503
|
+
* @deprecated true
|
|
497
504
|
* @deprecationMessage Use LocaleId instead
|
|
498
505
|
*/
|
|
499
506
|
export declare type LocalId = LocaleId;
|
|
@@ -599,11 +606,11 @@ interface BaseSource {
|
|
|
599
606
|
/** name of source */
|
|
600
607
|
name: string;
|
|
601
608
|
/** filename if this came from a file. */
|
|
602
|
-
filename?: string;
|
|
609
|
+
filename?: string | undefined;
|
|
603
610
|
/** The two settings that were merged to */
|
|
604
|
-
sources?: [CSpellSettings] | [CSpellSettings, CSpellSettings];
|
|
611
|
+
sources?: [CSpellSettings] | [CSpellSettings, CSpellSettings] | undefined;
|
|
605
612
|
/** The configuration read. */
|
|
606
|
-
fileSource?: CSpellSettings;
|
|
613
|
+
fileSource?: CSpellSettings | undefined;
|
|
607
614
|
}
|
|
608
615
|
/**
|
|
609
616
|
* reporter name or reporter name + reporter config
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "5.
|
|
6
|
+
"version": "5.13.3",
|
|
7
7
|
"description": "Types for cspell and cspell-lib",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"typings": "dist/index.d.ts",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"ajv-cli": "^5.0.0",
|
|
52
|
-
"jest": "^27.
|
|
52
|
+
"jest": "^27.4.0",
|
|
53
53
|
"rimraf": "^3.0.2",
|
|
54
|
-
"ts-json-schema-generator": "^0.
|
|
55
|
-
"typedoc": "^0.22.
|
|
56
|
-
"typedoc-plugin-markdown": "^3.11.
|
|
57
|
-
"typescript": "^4.
|
|
54
|
+
"ts-json-schema-generator": "^0.97.0",
|
|
55
|
+
"typedoc": "^0.22.10",
|
|
56
|
+
"typedoc-plugin-markdown": "^3.11.7",
|
|
57
|
+
"typescript": "^4.5.2"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "f49cb2d98eed1f7274b1e6ad1ef076e7140347b5"
|
|
60
60
|
}
|
|
@@ -1,589 +0,0 @@
|
|
|
1
|
-
export declare type ReplaceEntry = [string, string];
|
|
2
|
-
export declare type ReplaceMap = ReplaceEntry[];
|
|
3
|
-
/**
|
|
4
|
-
* These settings come from user and workspace settings.
|
|
5
|
-
*/
|
|
6
|
-
export declare type CSpellPackageSettings = CSpellUserSettings;
|
|
7
|
-
export declare type CSpellUserSettings = CSpellSettings;
|
|
8
|
-
export interface CSpellSettings extends FileSettings, LegacySettings {
|
|
9
|
-
$schema?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface ImportFileRef {
|
|
12
|
-
filename: string;
|
|
13
|
-
error?: Error;
|
|
14
|
-
referencedBy?: Source[];
|
|
15
|
-
}
|
|
16
|
-
export interface CSpellSettingsWithSourceTrace extends CSpellSettings {
|
|
17
|
-
source?: Source;
|
|
18
|
-
__importRef?: ImportFileRef;
|
|
19
|
-
__imports?: Map<string, ImportFileRef>;
|
|
20
|
-
}
|
|
21
|
-
export interface FileSettings extends ExtendableSettings {
|
|
22
|
-
/**
|
|
23
|
-
* Configuration format version of the settings file.
|
|
24
|
-
* @default "0.2"
|
|
25
|
-
*/
|
|
26
|
-
version?: Version;
|
|
27
|
-
/** Words to add to global dictionary -- should only be in the user config file. */
|
|
28
|
-
userWords?: string[];
|
|
29
|
-
/** Other settings files to be included */
|
|
30
|
-
import?: FsPath | FsPath[];
|
|
31
|
-
/**
|
|
32
|
-
* The root to use for glop patterns found in this configuration.
|
|
33
|
-
* Default: location of the configuration file.
|
|
34
|
-
* For compatibility reasons, config files with version 0.1, the glob root will
|
|
35
|
-
* default to be `${cwd}`.
|
|
36
|
-
*
|
|
37
|
-
* Use `globRoot` to define a different location.
|
|
38
|
-
* `globRoot` can be relative to the location of this configuration file.
|
|
39
|
-
* Defining globRoot, does not impact imported configurations.
|
|
40
|
-
*
|
|
41
|
-
* Special Values:
|
|
42
|
-
* - `${cwd}` - will be replaced with the current working directory.
|
|
43
|
-
* - `.` - will be the location of the containing configuration file.
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
globRoot?: FsPath;
|
|
47
|
-
/**
|
|
48
|
-
* Glob patterns of files to be checked.
|
|
49
|
-
* Glob patterns are relative to the `globRoot` of the configuration file that defines them.
|
|
50
|
-
*/
|
|
51
|
-
files?: Glob[];
|
|
52
|
-
/**
|
|
53
|
-
* Glob patterns of files to be ignored
|
|
54
|
-
* Glob patterns are relative to the `globRoot` of the configuration file that defines them.
|
|
55
|
-
*/
|
|
56
|
-
ignorePaths?: Glob[];
|
|
57
|
-
/**
|
|
58
|
-
* Prevents searching for local configuration when checking individual documents.
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
noConfigSearch?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Indicate that the configuration file should not be modified.
|
|
64
|
-
* This is used to prevent tools like the VS Code Spell Checker from
|
|
65
|
-
* modifying the file to add words and other configuration.
|
|
66
|
-
* @default false
|
|
67
|
-
*/
|
|
68
|
-
readonly?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Custom reporters configuration
|
|
71
|
-
*/
|
|
72
|
-
reporters?: ReporterSettings[];
|
|
73
|
-
}
|
|
74
|
-
export interface ExtendableSettings extends Settings {
|
|
75
|
-
/** Overrides to apply based upon the file path. */
|
|
76
|
-
overrides?: OverrideSettings[];
|
|
77
|
-
}
|
|
78
|
-
export interface Settings extends ReportingConfiguration, BaseSetting, PnPSettings {
|
|
79
|
-
/**
|
|
80
|
-
* Current active spelling language.
|
|
81
|
-
*
|
|
82
|
-
* Example: "en-GB" for British English
|
|
83
|
-
*
|
|
84
|
-
* Example: "en,nl" to enable both English and Dutch
|
|
85
|
-
* @default "en"
|
|
86
|
-
*/
|
|
87
|
-
language?: LocaleId;
|
|
88
|
-
/** languageIds for the files to spell check. */
|
|
89
|
-
enabledLanguageIds?: LanguageIdSingle[];
|
|
90
|
-
/**
|
|
91
|
-
* @title File Types to Check
|
|
92
|
-
* @scope resource
|
|
93
|
-
* @uniqueItems true
|
|
94
|
-
* @markdownDescription
|
|
95
|
-
* Enable / Disable checking file types (languageIds).
|
|
96
|
-
* These are in additional to the file types specified by `cSpell.enabledLanguageIds`.
|
|
97
|
-
* To disable a language, prefix with `!` as in `!json`,
|
|
98
|
-
*
|
|
99
|
-
* Example:
|
|
100
|
-
* ```
|
|
101
|
-
* jsonc // enable checking for jsonc
|
|
102
|
-
* !json // disable checking for json
|
|
103
|
-
* kotlin // enable checking for kotlin
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
enableFiletypes?: LanguageIdSingle[];
|
|
107
|
-
/** Additional settings for individual languages. */
|
|
108
|
-
languageSettings?: LanguageSetting[];
|
|
109
|
-
/** Forces the spell checker to assume a give language id. Used mainly as an Override. */
|
|
110
|
-
languageId?: LanguageId;
|
|
111
|
-
}
|
|
112
|
-
export interface ReportingConfiguration extends SuggestionsConfiguration {
|
|
113
|
-
/**
|
|
114
|
-
* The maximum number of problems to report in a file.
|
|
115
|
-
* @default 100
|
|
116
|
-
*/
|
|
117
|
-
maxNumberOfProblems?: number;
|
|
118
|
-
/**
|
|
119
|
-
* The maximum number of times the same word can be flagged as an error in a file.
|
|
120
|
-
* @default 5
|
|
121
|
-
*/
|
|
122
|
-
maxDuplicateProblems?: number;
|
|
123
|
-
/**
|
|
124
|
-
* The minimum length of a word before checking it against a dictionary.
|
|
125
|
-
* @default 4
|
|
126
|
-
*/
|
|
127
|
-
minWordLength?: number;
|
|
128
|
-
}
|
|
129
|
-
export interface SuggestionsConfiguration {
|
|
130
|
-
/**
|
|
131
|
-
* Number of suggestions to make
|
|
132
|
-
* @default 10
|
|
133
|
-
*/
|
|
134
|
-
numSuggestions?: number;
|
|
135
|
-
/**
|
|
136
|
-
* The maximum amount of time in milliseconds to generate suggestions for a word.
|
|
137
|
-
* @default 500
|
|
138
|
-
*/
|
|
139
|
-
suggestionsTimeout?: number;
|
|
140
|
-
/**
|
|
141
|
-
* The maximum number of changes allowed on a word to be considered a suggestions.
|
|
142
|
-
*
|
|
143
|
-
* For example, appending an `s` onto `example` -> `examples` is considered 1 change.
|
|
144
|
-
*
|
|
145
|
-
* Range: between 1 and 5.
|
|
146
|
-
* @default 3
|
|
147
|
-
*/
|
|
148
|
-
suggestionNumChanges?: number;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Plug N Play settings to support package systems like Yarn 2.
|
|
152
|
-
*/
|
|
153
|
-
export interface PnPSettings {
|
|
154
|
-
/**
|
|
155
|
-
* Packages managers like Yarn 2 use a `.pnp.cjs` file to assist in loading
|
|
156
|
-
* packages stored in the repository.
|
|
157
|
-
*
|
|
158
|
-
* When true, the spell checker will search up the directory structure for the existence
|
|
159
|
-
* of a PnP file and load it.
|
|
160
|
-
*
|
|
161
|
-
* @default false
|
|
162
|
-
*/
|
|
163
|
-
usePnP?: boolean;
|
|
164
|
-
/**
|
|
165
|
-
* The PnP files to search for. Note: `.mjs` files are not currently supported.
|
|
166
|
-
*
|
|
167
|
-
* @default [".pnp.js", ".pnp.cjs"]
|
|
168
|
-
*/
|
|
169
|
-
pnpFiles?: string[];
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* To prevent the unwanted execution of untrusted code, WorkspaceTrustSettings
|
|
173
|
-
* are use to set the trust levels.
|
|
174
|
-
*
|
|
175
|
-
* Trust setting have an impact on both `cspell.config.js` files and on `.pnp.js` files.
|
|
176
|
-
* In an untrusted location, these files will NOT be used.
|
|
177
|
-
*
|
|
178
|
-
* This will also prevent any associated plugins from being loaded.
|
|
179
|
-
*/
|
|
180
|
-
export interface WorkspaceTrustSettings {
|
|
181
|
-
/**
|
|
182
|
-
* Glob patterns of locations that contain ALWAYS trusted files
|
|
183
|
-
*/
|
|
184
|
-
trustedFiles?: Glob[];
|
|
185
|
-
/**
|
|
186
|
-
* Glob patterns of locations that contain NEVER trusted files
|
|
187
|
-
*/
|
|
188
|
-
untrustedFiles?: Glob[];
|
|
189
|
-
/**
|
|
190
|
-
* Sets the default trust level
|
|
191
|
-
* @default "trusted"
|
|
192
|
-
*/
|
|
193
|
-
trustLevel?: TrustLevel;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* VS Code Spell Checker Settings
|
|
197
|
-
* To be Removed
|
|
198
|
-
* @deprecated
|
|
199
|
-
*/
|
|
200
|
-
export interface LegacySettings {
|
|
201
|
-
/**
|
|
202
|
-
* Show status
|
|
203
|
-
* @deprecated
|
|
204
|
-
*/
|
|
205
|
-
showStatus?: boolean;
|
|
206
|
-
/**
|
|
207
|
-
* Delay in ms after a document has changed before checking it for spelling errors.
|
|
208
|
-
* @deprecated
|
|
209
|
-
*/
|
|
210
|
-
spellCheckDelayMs?: number;
|
|
211
|
-
}
|
|
212
|
-
export interface OverrideSettings extends Settings, OverrideFilterFields {
|
|
213
|
-
/** Sets the programming language id */
|
|
214
|
-
languageId?: LanguageId;
|
|
215
|
-
/** Sets the locale */
|
|
216
|
-
language?: LocaleId;
|
|
217
|
-
}
|
|
218
|
-
export interface OverrideFilterFields {
|
|
219
|
-
/** Glob pattern or patterns to match against */
|
|
220
|
-
filename: Glob | Glob[];
|
|
221
|
-
}
|
|
222
|
-
export interface BaseSetting {
|
|
223
|
-
/** Optional identifier */
|
|
224
|
-
id?: string;
|
|
225
|
-
/** Optional name of configuration */
|
|
226
|
-
name?: string;
|
|
227
|
-
/** Optional description of configuration */
|
|
228
|
-
description?: string;
|
|
229
|
-
/**
|
|
230
|
-
* Is the spell checker enabled
|
|
231
|
-
* @default true
|
|
232
|
-
*/
|
|
233
|
-
enabled?: boolean;
|
|
234
|
-
/** list of words to be always considered correct */
|
|
235
|
-
words?: string[];
|
|
236
|
-
/** list of words to always be considered incorrect. */
|
|
237
|
-
flagWords?: string[];
|
|
238
|
-
/** List of words to be ignored. An Ignored word will not show up as an error even if it is also in the `flagWords`. */
|
|
239
|
-
ignoreWords?: string[];
|
|
240
|
-
/**
|
|
241
|
-
* True to enable compound word checking.
|
|
242
|
-
* @default false
|
|
243
|
-
*/
|
|
244
|
-
allowCompoundWords?: boolean;
|
|
245
|
-
/**
|
|
246
|
-
* Words must match case rules.
|
|
247
|
-
* @default false
|
|
248
|
-
*/
|
|
249
|
-
caseSensitive?: boolean;
|
|
250
|
-
/** Define additional available dictionaries */
|
|
251
|
-
dictionaryDefinitions?: DictionaryDefinition[];
|
|
252
|
-
/**
|
|
253
|
-
* Optional list of dictionaries to use.
|
|
254
|
-
* Each entry should match the name of the dictionary.
|
|
255
|
-
* To remove a dictionary from the list add `!` before the name.
|
|
256
|
-
* i.e. `!typescript` will turn off the dictionary with the name `typescript`.
|
|
257
|
-
*/
|
|
258
|
-
dictionaries?: DictionaryReference[];
|
|
259
|
-
/**
|
|
260
|
-
* Optional list of dictionaries that will not be used for suggestions.
|
|
261
|
-
* Words in these dictionaries are considered correct, but will not be
|
|
262
|
-
* used when making spell correction suggestions.
|
|
263
|
-
*
|
|
264
|
-
* Note: if a word is suggested by another dictionary, but found in
|
|
265
|
-
* one of these dictionaries, it will be removed from the set of
|
|
266
|
-
* possible suggestions.
|
|
267
|
-
*/
|
|
268
|
-
noSuggestDictionaries?: DictionaryReference[];
|
|
269
|
-
/**
|
|
270
|
-
* List of RegExp patterns or Pattern names to exclude from spell checking.
|
|
271
|
-
*
|
|
272
|
-
* Example: ["href"] - to exclude html href
|
|
273
|
-
*/
|
|
274
|
-
ignoreRegExpList?: RegExpPatternList;
|
|
275
|
-
/**
|
|
276
|
-
* List of RegExp patterns or defined Pattern names to define the text to be included for spell checking.
|
|
277
|
-
* If includeRegExpList is defined, ONLY, text matching the included patterns will be checked.
|
|
278
|
-
*/
|
|
279
|
-
includeRegExpList?: RegExpPatternList;
|
|
280
|
-
/** Defines a list of patterns that can be used in ignoreRegExpList and includeRegExpList */
|
|
281
|
-
patterns?: RegExpPatternDefinition[];
|
|
282
|
-
}
|
|
283
|
-
export declare type DictionaryFileTypes = 'S' | 'W' | 'C' | 'T';
|
|
284
|
-
export declare type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy;
|
|
285
|
-
export interface DictionaryDefinitionBase {
|
|
286
|
-
/**
|
|
287
|
-
* This is the name of a dictionary.
|
|
288
|
-
*
|
|
289
|
-
* Name Format:
|
|
290
|
-
* - Must contain at least 1 number or letter.
|
|
291
|
-
* - spaces are allowed.
|
|
292
|
-
* - Leading and trailing space will be removed.
|
|
293
|
-
* - Names ARE case-sensitive
|
|
294
|
-
* - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`
|
|
295
|
-
*/
|
|
296
|
-
name: DictionaryId;
|
|
297
|
-
/** Optional description */
|
|
298
|
-
description?: string;
|
|
299
|
-
/** Replacement pairs */
|
|
300
|
-
repMap?: ReplaceMap;
|
|
301
|
-
/** Use Compounds */
|
|
302
|
-
useCompounds?: boolean;
|
|
303
|
-
/**
|
|
304
|
-
* Indicate that suggestions should not come from this dictionary.
|
|
305
|
-
* Words in this dictionary are considered correct, but will not be
|
|
306
|
-
* used when making spell correction suggestions.
|
|
307
|
-
*
|
|
308
|
-
* Note: if a word is suggested by another dictionary, but found in
|
|
309
|
-
* this dictionary, it will be removed from the set of
|
|
310
|
-
* possible suggestions.
|
|
311
|
-
*/
|
|
312
|
-
noSuggest?: boolean;
|
|
313
|
-
}
|
|
314
|
-
export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase {
|
|
315
|
-
/** Path to the file */
|
|
316
|
-
path: DictionaryPath;
|
|
317
|
-
/**
|
|
318
|
-
* Only for legacy dictionary definitions
|
|
319
|
-
* @deprecated
|
|
320
|
-
* @deprecationMessage Use `path` instead.
|
|
321
|
-
* @hidden
|
|
322
|
-
*/
|
|
323
|
-
file?: undefined;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Only for legacy dictionary definitions
|
|
327
|
-
* @deprecated
|
|
328
|
-
* @deprecationMessage Use `DictionaryDefinitionPreferred`
|
|
329
|
-
*/
|
|
330
|
-
export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase {
|
|
331
|
-
/** @hidden */
|
|
332
|
-
path?: undefined;
|
|
333
|
-
/**
|
|
334
|
-
* Path to the file, only for legacy dictionary definitions
|
|
335
|
-
* @deprecated
|
|
336
|
-
* @deprecationMessage Use `path` instead.
|
|
337
|
-
*/
|
|
338
|
-
file: DictionaryPath;
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* @deprecated
|
|
342
|
-
* @hidden
|
|
343
|
-
*/
|
|
344
|
-
export interface DictionaryDefinitionLegacy extends DictionaryDefinitionBase {
|
|
345
|
-
/** Path to the file, if undefined the path to the extension dictionaries is assumed */
|
|
346
|
-
path?: FsPath;
|
|
347
|
-
/**
|
|
348
|
-
* File name
|
|
349
|
-
* @deprecated
|
|
350
|
-
* @deprecationMessage Use path instead.
|
|
351
|
-
*/
|
|
352
|
-
file: FsPath;
|
|
353
|
-
/**
|
|
354
|
-
* Type of file:
|
|
355
|
-
* S - single word per line,
|
|
356
|
-
* W - each line can contain one or more words separated by space,
|
|
357
|
-
* C - each line is treated like code (Camel Case is allowed)
|
|
358
|
-
* Default is S
|
|
359
|
-
* C is the slowest to load due to the need to split each line based upon code splitting rules.
|
|
360
|
-
* @default "S"
|
|
361
|
-
*/
|
|
362
|
-
type?: DictionaryFileTypes;
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* Specifies the scope of a dictionary.
|
|
366
|
-
*/
|
|
367
|
-
export declare type CustomDictionaryScope = 'user' | 'workspace' | 'folder';
|
|
368
|
-
/**
|
|
369
|
-
* For Defining Custom dictionaries. They are generally scoped to a
|
|
370
|
-
* `user`, `workspace`, or `folder`.
|
|
371
|
-
* When `addWords` is true, indicates that the spell checker can add words
|
|
372
|
-
* to the file.
|
|
373
|
-
* Note: only plain text files with one word per line are supported at this moment.
|
|
374
|
-
*/
|
|
375
|
-
export interface DictionaryDefinitionCustom extends DictionaryDefinitionPreferred {
|
|
376
|
-
/** Path to custom dictionary text file. */
|
|
377
|
-
path: CustomDictionaryPath;
|
|
378
|
-
/**
|
|
379
|
-
* Defines the scope for when words will be added to the dictionary.
|
|
380
|
-
* Scope values: `user`, `workspace`, `folder`
|
|
381
|
-
*/
|
|
382
|
-
scope?: CustomDictionaryScope | CustomDictionaryScope[];
|
|
383
|
-
/**
|
|
384
|
-
* When `true`, let's the spell checker know that words can be added to this dictionary.
|
|
385
|
-
*/
|
|
386
|
-
addWords: boolean;
|
|
387
|
-
}
|
|
388
|
-
export interface LanguageSetting extends LanguageSettingFilterFields, BaseSetting {
|
|
389
|
-
}
|
|
390
|
-
export interface LanguageSettingFilterFields extends LanguageSettingFilterFieldsPreferred, LanguageSettingFilterFieldsDeprecated {
|
|
391
|
-
}
|
|
392
|
-
export interface LanguageSettingFilterFieldsPreferred {
|
|
393
|
-
/** The language id. Ex: "typescript", "html", or "php". "*" -- will match all languages */
|
|
394
|
-
languageId: LanguageId | LanguageIdSingle[];
|
|
395
|
-
/** The locale filter, matches against the language. This can be a comma separated list. "*" will match all locales. */
|
|
396
|
-
locale?: LocaleId | LocaleId[];
|
|
397
|
-
}
|
|
398
|
-
export interface LanguageSettingFilterFieldsDeprecated {
|
|
399
|
-
/** The language id. Ex: "typescript", "html", or "php". "*" -- will match all languages */
|
|
400
|
-
languageId: LanguageId | LanguageIdSingle[];
|
|
401
|
-
/**
|
|
402
|
-
* Deprecated - The locale filter, matches against the language. This can be a comma separated list. "*" will match all locales.
|
|
403
|
-
* @deprecated
|
|
404
|
-
* @deprecationMessage Use `locale` instead
|
|
405
|
-
*/
|
|
406
|
-
local?: LocaleId | LocaleId[];
|
|
407
|
-
}
|
|
408
|
-
/** @hidden */
|
|
409
|
-
declare type InternalRegExp = RegExp;
|
|
410
|
-
export declare type Pattern = string | InternalRegExp;
|
|
411
|
-
export declare type PredefinedPatterns = 'Base64' | 'CStyleComment' | 'CStyleHexValue' | 'CSSHexValue' | 'CommitHash' | 'CommitHashLink' | 'Email' | 'EscapeCharacters' | 'HexValues' | 'href' | 'PhpHereDoc' | 'PublicKey' | 'RsaCert' | 'SHA' | 'SpellCheckerDisable' | 'SpellCheckerDisableBlock' | 'SpellCheckerDisableLine' | 'SpellCheckerDisableNext' | 'SpellCheckerIgnoreInDocSetting' | 'string' | 'UnicodeRef' | 'Urls' | 'UUID' | 'Everything';
|
|
412
|
-
/** This matches the name in a pattern definition */
|
|
413
|
-
export declare type PatternId = string;
|
|
414
|
-
/** A PatternRef is a Pattern or PatternId. */
|
|
415
|
-
export declare type PatternRef = Pattern | PatternId | PredefinedPatterns;
|
|
416
|
-
/** A list of pattern names or regular expressions */
|
|
417
|
-
export declare type RegExpPatternList = PatternRef[];
|
|
418
|
-
/**
|
|
419
|
-
* This is the name of a dictionary.
|
|
420
|
-
*
|
|
421
|
-
* Name Format:
|
|
422
|
-
* - Must contain at least 1 number or letter.
|
|
423
|
-
* - spaces are allowed.
|
|
424
|
-
* - Leading and trailing space will be removed.
|
|
425
|
-
* - Names ARE case-sensitive
|
|
426
|
-
* - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`
|
|
427
|
-
*
|
|
428
|
-
* @pattern ^(?=[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
|
|
429
|
-
*/
|
|
430
|
-
export declare type DictionaryId = string;
|
|
431
|
-
/**
|
|
432
|
-
* This a reference to a named dictionary.
|
|
433
|
-
* It is expected to match the name of a dictionary.
|
|
434
|
-
*/
|
|
435
|
-
export declare type DictionaryRef = DictionaryId;
|
|
436
|
-
/**
|
|
437
|
-
* This a negative reference to a named dictionary.
|
|
438
|
-
*
|
|
439
|
-
* It is used to exclude or include a dictionary by name.
|
|
440
|
-
*
|
|
441
|
-
* The reference starts with 1 or more `!`.
|
|
442
|
-
* - `!<dictionary_name>` - Used to exclude the dictionary matching `<dictionary_name>`
|
|
443
|
-
* - `!!<dictionary_name>` - Used to re-include a dictionary matching `<dictionary_name>`
|
|
444
|
-
* Overrides `!<dictionary_name>`.
|
|
445
|
-
* - `!!!<dictionary_name>` - Used to exclude a dictionary matching `<dictionary_name>`
|
|
446
|
-
* Overrides `!!<dictionary_name>`.
|
|
447
|
-
*
|
|
448
|
-
* @pattern ^(?=!+[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$
|
|
449
|
-
*/
|
|
450
|
-
export declare type DictionaryNegRef = string;
|
|
451
|
-
/**
|
|
452
|
-
* Reference to a dictionary by name.
|
|
453
|
-
* One of:
|
|
454
|
-
* - {@link DictionaryRef}
|
|
455
|
-
* - {@link DictionaryNegRef}
|
|
456
|
-
*/
|
|
457
|
-
export declare type DictionaryReference = DictionaryRef | DictionaryNegRef;
|
|
458
|
-
/** This is a written language locale like: 'en', 'en-GB', 'fr', 'es', 'de', etc. */
|
|
459
|
-
export declare type LocaleId = string;
|
|
460
|
-
/**
|
|
461
|
-
* Configuration File Version
|
|
462
|
-
*/
|
|
463
|
-
export declare type VersionLatest = '0.2';
|
|
464
|
-
/**
|
|
465
|
-
* Legacy Configuration File Versions
|
|
466
|
-
* @deprecated
|
|
467
|
-
* @deprecationMessage Use `0.2`
|
|
468
|
-
*/
|
|
469
|
-
export declare type VersionLegacy = '0.1';
|
|
470
|
-
export declare type Version = VersionLatest | VersionLegacy;
|
|
471
|
-
/**
|
|
472
|
-
* @deprecated
|
|
473
|
-
* @deprecationMessage Use LocaleId instead
|
|
474
|
-
*/
|
|
475
|
-
export declare type LocalId = LocaleId;
|
|
476
|
-
/** These are glob expressions */
|
|
477
|
-
export declare type Glob = SimpleGlob | GlobDef;
|
|
478
|
-
/** Simple Glob string, the root will be globRoot */
|
|
479
|
-
export declare type SimpleGlob = string;
|
|
480
|
-
/**
|
|
481
|
-
* Used to define fully qualified glob patterns.
|
|
482
|
-
* It is currently hidden to make the json-schema a bit easier to use
|
|
483
|
-
* when crafting cspell.json files by hand.
|
|
484
|
-
* @hidden
|
|
485
|
-
*/
|
|
486
|
-
export interface GlobDef {
|
|
487
|
-
/** Glob pattern to match */
|
|
488
|
-
glob: string;
|
|
489
|
-
/** Optional root to use when matching the glob. Defaults to current working dir. */
|
|
490
|
-
root?: string;
|
|
491
|
-
/**
|
|
492
|
-
* Optional source of the glob, used when merging settings to determine the origin.
|
|
493
|
-
* @hidden
|
|
494
|
-
*/
|
|
495
|
-
source?: string;
|
|
496
|
-
}
|
|
497
|
-
/**
|
|
498
|
-
* This can be '*', 'typescript', 'cpp', 'json', etc.
|
|
499
|
-
* @pattern ^(!?[-\w_\s]+)|(\*)$
|
|
500
|
-
*/
|
|
501
|
-
export declare type LanguageIdSingle = string;
|
|
502
|
-
/**
|
|
503
|
-
* This can be 'typescript,cpp,json,literal haskell', etc.
|
|
504
|
-
* @pattern ^([-\w_\s]+)(,[-\w_\s]+)*$
|
|
505
|
-
*/
|
|
506
|
-
export declare type LanguageIdMultiple = string;
|
|
507
|
-
/**
|
|
508
|
-
* This can be 'typescript,cpp,json,literal haskell', etc.
|
|
509
|
-
* @pattern ^(![-\w_\s]+)(,![-\w_\s]+)*$
|
|
510
|
-
*/
|
|
511
|
-
export declare type LanguageIdMultipleNeg = string;
|
|
512
|
-
export declare type LanguageId = LanguageIdSingle | LanguageIdMultiple | LanguageIdMultipleNeg;
|
|
513
|
-
/** A File System Path */
|
|
514
|
-
export declare type FsPath = string;
|
|
515
|
-
/** Trust Security Level */
|
|
516
|
-
export declare type TrustLevel = 'trusted' | 'untrusted';
|
|
517
|
-
/**
|
|
518
|
-
* A File System Path to a dictionary file.
|
|
519
|
-
* @pattern ^.*\.(?:txt|trie)(?:\.gz)?$
|
|
520
|
-
*/
|
|
521
|
-
export declare type DictionaryPath = string;
|
|
522
|
-
/**
|
|
523
|
-
* A File System Path to a dictionary file.
|
|
524
|
-
* @pattern ^.*\.txt$
|
|
525
|
-
*/
|
|
526
|
-
export declare type CustomDictionaryPath = string;
|
|
527
|
-
export interface RegExpPatternDefinition {
|
|
528
|
-
/**
|
|
529
|
-
* Pattern name, used as an identifier in ignoreRegExpList and includeRegExpList.
|
|
530
|
-
* It is possible to redefine one of the predefined patterns to override its value.
|
|
531
|
-
*/
|
|
532
|
-
name: PatternId;
|
|
533
|
-
/**
|
|
534
|
-
* RegExp pattern or array of RegExp patterns
|
|
535
|
-
*/
|
|
536
|
-
pattern: Pattern | Pattern[];
|
|
537
|
-
/**
|
|
538
|
-
* Description of the pattern.
|
|
539
|
-
*/
|
|
540
|
-
description?: string;
|
|
541
|
-
}
|
|
542
|
-
export declare type CSpellUserSettingsWithComments = CSpellUserSettings;
|
|
543
|
-
export declare type Source = FileSource | MergeSource | InMemorySource | BaseSource;
|
|
544
|
-
export interface FileSource extends BaseSource {
|
|
545
|
-
/** name of source */
|
|
546
|
-
name: string;
|
|
547
|
-
/** filename if this came from a file. */
|
|
548
|
-
filename: string;
|
|
549
|
-
/** The two settings that were merged to */
|
|
550
|
-
sources?: undefined;
|
|
551
|
-
/** The configuration read. */
|
|
552
|
-
fileSource: CSpellSettings;
|
|
553
|
-
}
|
|
554
|
-
export interface MergeSource extends BaseSource {
|
|
555
|
-
/** name of source */
|
|
556
|
-
name: string;
|
|
557
|
-
/** filename if this came from a file. */
|
|
558
|
-
filename?: undefined;
|
|
559
|
-
/** The two settings that were merged to */
|
|
560
|
-
sources: [CSpellSettings] | [CSpellSettings, CSpellSettings];
|
|
561
|
-
/** The configuration read. */
|
|
562
|
-
fileSource?: undefined;
|
|
563
|
-
}
|
|
564
|
-
export interface InMemorySource extends BaseSource {
|
|
565
|
-
/** name of source */
|
|
566
|
-
name: string;
|
|
567
|
-
/** filename if this came from a file. */
|
|
568
|
-
filename?: undefined;
|
|
569
|
-
/** The two settings that were merged to */
|
|
570
|
-
sources?: undefined;
|
|
571
|
-
/** The configuration read. */
|
|
572
|
-
fileSource?: undefined;
|
|
573
|
-
}
|
|
574
|
-
interface BaseSource {
|
|
575
|
-
/** name of source */
|
|
576
|
-
name: string;
|
|
577
|
-
/** filename if this came from a file. */
|
|
578
|
-
filename?: string;
|
|
579
|
-
/** The two settings that were merged to */
|
|
580
|
-
sources?: [CSpellSettings] | [CSpellSettings, CSpellSettings];
|
|
581
|
-
/** The configuration read. */
|
|
582
|
-
fileSource?: CSpellSettings;
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* reporter name or reporter name + reporter config
|
|
586
|
-
*/
|
|
587
|
-
export declare type ReporterSettings = string | [string] | [string, unknown];
|
|
588
|
-
export {};
|
|
589
|
-
//# sourceMappingURL=CSpellSettingsDef.d.ts.map
|
package/dist/settings/index.d.ts
DELETED
package/dist/settings/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./CSpellSettingsDef"), exports);
|
|
14
|
-
//# sourceMappingURL=index.js.map
|