@cspell/cspell-types 5.19.6 → 5.21.0
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 +30 -30
- package/dist/CSpellSettingsDef.d.ts +123 -17
- package/package.json +7 -7
package/cspell.schema.json
CHANGED
|
@@ -630,7 +630,7 @@
|
|
|
630
630
|
"properties": {
|
|
631
631
|
"allowCompoundWords": {
|
|
632
632
|
"default": false,
|
|
633
|
-
"description": "True to enable compound word checking.",
|
|
633
|
+
"description": "True to enable compound word checking. See [Case Sensitivity](https://cspell.org/docs/case-sensitive/) for more details.",
|
|
634
634
|
"type": "boolean"
|
|
635
635
|
},
|
|
636
636
|
"caseSensitive": {
|
|
@@ -643,14 +643,14 @@
|
|
|
643
643
|
"type": "string"
|
|
644
644
|
},
|
|
645
645
|
"dictionaries": {
|
|
646
|
-
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary
|
|
646
|
+
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary.\n\nTo remove a dictionary from the list, add `!` before the name.\n\nFor example, `!typescript` will turn off the dictionary with the name `typescript`.\n\nSee the [Dictionaries](https://cspell.org/docs/dictionaries/) and [Custom Dictionaries](https://cspell.org/docs/dictionaries-custom/) for more details.",
|
|
647
647
|
"items": {
|
|
648
648
|
"$ref": "#/definitions/DictionaryReference"
|
|
649
649
|
},
|
|
650
650
|
"type": "array"
|
|
651
651
|
},
|
|
652
652
|
"dictionaryDefinitions": {
|
|
653
|
-
"description": "Define additional available dictionaries.",
|
|
653
|
+
"description": "Define additional available dictionaries.\n\nFor example, you can use the following to add a custom dictionary:\n\n```json \"dictionaryDefinitions\": [ { \"name\": \"custom-words\", \"path\": \"./custom-words.txt\"} ], \"dictionaries\": [\"custom-words\"] ```",
|
|
654
654
|
"items": {
|
|
655
655
|
"$ref": "#/definitions/DictionaryDefinition"
|
|
656
656
|
},
|
|
@@ -674,10 +674,10 @@
|
|
|
674
674
|
},
|
|
675
675
|
"ignoreRegExpList": {
|
|
676
676
|
"$ref": "#/definitions/RegExpPatternList",
|
|
677
|
-
"description": "List of
|
|
677
|
+
"description": "List of regular expression patterns or pattern names to exclude from spell checking.\n\nExample: [\"href\"] - to exclude html href.\n\nBy default, several patterns are excluded. See [Configuration](https://cspell.org/configuration/#cspelljson-sections) for more details.\n\nWhile you can create your own patterns, you can also leverage several patterns that are [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22)."
|
|
678
678
|
},
|
|
679
679
|
"ignoreWords": {
|
|
680
|
-
"description": "List of words to be ignored. An
|
|
680
|
+
"description": "List of words to be ignored. An ignored word will not show up as an error, even if it is also in the `flagWords`.",
|
|
681
681
|
"items": {
|
|
682
682
|
"type": "string"
|
|
683
683
|
},
|
|
@@ -685,7 +685,7 @@
|
|
|
685
685
|
},
|
|
686
686
|
"includeRegExpList": {
|
|
687
687
|
"$ref": "#/definitions/RegExpPatternList",
|
|
688
|
-
"description": "List of
|
|
688
|
+
"description": "List of regular expression patterns or defined pattern names to match for spell checking.\n\nIf this property is defined, only text matching the included patterns will be checked.\n\nWhile you can create your own patterns, you can also leverage several patterns that are [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22)."
|
|
689
689
|
},
|
|
690
690
|
"languageId": {
|
|
691
691
|
"anyOf": [
|
|
@@ -743,7 +743,7 @@
|
|
|
743
743
|
"type": "array"
|
|
744
744
|
},
|
|
745
745
|
"patterns": {
|
|
746
|
-
"description": "Defines a list of patterns that can be used
|
|
746
|
+
"description": "Defines a list of patterns that can be used with the `ignoreRegExpList` and `includeRegExpList` options.\n\nFor example:\n\n```javascript \"ignoreRegExpList\": [\"comments\"], \"patterns\": [ { \"name\": \"comment-single-line\", \"pattern\": \"/#.*/g\" }, { \"name\": \"comment-multi-line\", \"pattern\": \"/(?:\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\/)/g\" }, // You can also combine multiple named patterns into one single named pattern { \"name\": \"comments\", \"pattern\": [\"comment-single-line\", \"comment-multi-line\"] } ] ```",
|
|
747
747
|
"items": {
|
|
748
748
|
"$ref": "#/definitions/RegExpPatternDefinition"
|
|
749
749
|
},
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
"properties": {
|
|
772
772
|
"allowCompoundWords": {
|
|
773
773
|
"default": false,
|
|
774
|
-
"description": "True to enable compound word checking.",
|
|
774
|
+
"description": "True to enable compound word checking. See [Case Sensitivity](https://cspell.org/docs/case-sensitive/) for more details.",
|
|
775
775
|
"type": "boolean"
|
|
776
776
|
},
|
|
777
777
|
"caseSensitive": {
|
|
@@ -784,14 +784,14 @@
|
|
|
784
784
|
"type": "string"
|
|
785
785
|
},
|
|
786
786
|
"dictionaries": {
|
|
787
|
-
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary
|
|
787
|
+
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary.\n\nTo remove a dictionary from the list, add `!` before the name.\n\nFor example, `!typescript` will turn off the dictionary with the name `typescript`.\n\nSee the [Dictionaries](https://cspell.org/docs/dictionaries/) and [Custom Dictionaries](https://cspell.org/docs/dictionaries-custom/) for more details.",
|
|
788
788
|
"items": {
|
|
789
789
|
"$ref": "#/definitions/DictionaryReference"
|
|
790
790
|
},
|
|
791
791
|
"type": "array"
|
|
792
792
|
},
|
|
793
793
|
"dictionaryDefinitions": {
|
|
794
|
-
"description": "Define additional available dictionaries.",
|
|
794
|
+
"description": "Define additional available dictionaries.\n\nFor example, you can use the following to add a custom dictionary:\n\n```json \"dictionaryDefinitions\": [ { \"name\": \"custom-words\", \"path\": \"./custom-words.txt\"} ], \"dictionaries\": [\"custom-words\"] ```",
|
|
795
795
|
"items": {
|
|
796
796
|
"$ref": "#/definitions/DictionaryDefinition"
|
|
797
797
|
},
|
|
@@ -846,10 +846,10 @@
|
|
|
846
846
|
},
|
|
847
847
|
"ignoreRegExpList": {
|
|
848
848
|
"$ref": "#/definitions/RegExpPatternList",
|
|
849
|
-
"description": "List of
|
|
849
|
+
"description": "List of regular expression patterns or pattern names to exclude from spell checking.\n\nExample: [\"href\"] - to exclude html href.\n\nBy default, several patterns are excluded. See [Configuration](https://cspell.org/configuration/#cspelljson-sections) for more details.\n\nWhile you can create your own patterns, you can also leverage several patterns that are [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22)."
|
|
850
850
|
},
|
|
851
851
|
"ignoreWords": {
|
|
852
|
-
"description": "List of words to be ignored. An
|
|
852
|
+
"description": "List of words to be ignored. An ignored word will not show up as an error, even if it is also in the `flagWords`.",
|
|
853
853
|
"items": {
|
|
854
854
|
"type": "string"
|
|
855
855
|
},
|
|
@@ -857,7 +857,7 @@
|
|
|
857
857
|
},
|
|
858
858
|
"includeRegExpList": {
|
|
859
859
|
"$ref": "#/definitions/RegExpPatternList",
|
|
860
|
-
"description": "List of
|
|
860
|
+
"description": "List of regular expression patterns or defined pattern names to match for spell checking.\n\nIf this property is defined, only text matching the included patterns will be checked.\n\nWhile you can create your own patterns, you can also leverage several patterns that are [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22)."
|
|
861
861
|
},
|
|
862
862
|
"language": {
|
|
863
863
|
"$ref": "#/definitions/LocaleId",
|
|
@@ -868,7 +868,7 @@
|
|
|
868
868
|
"description": "Sets the programming language id."
|
|
869
869
|
},
|
|
870
870
|
"languageSettings": {
|
|
871
|
-
"description": "Additional settings for individual languages.",
|
|
871
|
+
"description": "Additional settings for individual languages.\n\nSee [Language Settings](https://cspell.org/configuration/language-settings/) for more details.",
|
|
872
872
|
"items": {
|
|
873
873
|
"$ref": "#/definitions/LanguageSetting"
|
|
874
874
|
},
|
|
@@ -911,7 +911,7 @@
|
|
|
911
911
|
"type": "number"
|
|
912
912
|
},
|
|
913
913
|
"patterns": {
|
|
914
|
-
"description": "Defines a list of patterns that can be used
|
|
914
|
+
"description": "Defines a list of patterns that can be used with the `ignoreRegExpList` and `includeRegExpList` options.\n\nFor example:\n\n```javascript \"ignoreRegExpList\": [\"comments\"], \"patterns\": [ { \"name\": \"comment-single-line\", \"pattern\": \"/#.*/g\" }, { \"name\": \"comment-multi-line\", \"pattern\": \"/(?:\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\/)/g\" }, // You can also combine multiple named patterns into one single named pattern { \"name\": \"comments\", \"pattern\": [\"comment-single-line\", \"comment-multi-line\"] } ] ```",
|
|
915
915
|
"items": {
|
|
916
916
|
"$ref": "#/definitions/RegExpPatternDefinition"
|
|
917
917
|
},
|
|
@@ -1168,7 +1168,7 @@
|
|
|
1168
1168
|
},
|
|
1169
1169
|
"allowCompoundWords": {
|
|
1170
1170
|
"default": false,
|
|
1171
|
-
"description": "True to enable compound word checking.",
|
|
1171
|
+
"description": "True to enable compound word checking. See [Case Sensitivity](https://cspell.org/docs/case-sensitive/) for more details.",
|
|
1172
1172
|
"type": "boolean"
|
|
1173
1173
|
},
|
|
1174
1174
|
"cache": {
|
|
@@ -1185,14 +1185,14 @@
|
|
|
1185
1185
|
"type": "string"
|
|
1186
1186
|
},
|
|
1187
1187
|
"dictionaries": {
|
|
1188
|
-
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary
|
|
1188
|
+
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary.\n\nTo remove a dictionary from the list, add `!` before the name.\n\nFor example, `!typescript` will turn off the dictionary with the name `typescript`.\n\nSee the [Dictionaries](https://cspell.org/docs/dictionaries/) and [Custom Dictionaries](https://cspell.org/docs/dictionaries-custom/) for more details.",
|
|
1189
1189
|
"items": {
|
|
1190
1190
|
"$ref": "#/definitions/DictionaryReference"
|
|
1191
1191
|
},
|
|
1192
1192
|
"type": "array"
|
|
1193
1193
|
},
|
|
1194
1194
|
"dictionaryDefinitions": {
|
|
1195
|
-
"description": "Define additional available dictionaries.",
|
|
1195
|
+
"description": "Define additional available dictionaries.\n\nFor example, you can use the following to add a custom dictionary:\n\n```json \"dictionaryDefinitions\": [ { \"name\": \"custom-words\", \"path\": \"./custom-words.txt\"} ], \"dictionaries\": [\"custom-words\"] ```",
|
|
1196
1196
|
"items": {
|
|
1197
1197
|
"$ref": "#/definitions/DictionaryDefinition"
|
|
1198
1198
|
},
|
|
@@ -1210,7 +1210,7 @@
|
|
|
1210
1210
|
},
|
|
1211
1211
|
"enableGlobDot": {
|
|
1212
1212
|
"default": false,
|
|
1213
|
-
"description": "Enable scanning files and directories beginning with `.` (period)
|
|
1213
|
+
"description": "Enable scanning files and directories beginning with `.` (period).\n\nBy default, CSpell does not scan `hidden` files.",
|
|
1214
1214
|
"type": "boolean"
|
|
1215
1215
|
},
|
|
1216
1216
|
"enabled": {
|
|
@@ -1235,7 +1235,7 @@
|
|
|
1235
1235
|
"description": "Configure CSpell features.\n\n- Added with `v5.16.0`."
|
|
1236
1236
|
},
|
|
1237
1237
|
"files": {
|
|
1238
|
-
"description": "Glob patterns of files to be checked
|
|
1238
|
+
"description": "Glob patterns of files to be checked.\n\nGlob patterns are relative to the `globRoot` of the configuration file that defines them.",
|
|
1239
1239
|
"items": {
|
|
1240
1240
|
"$ref": "#/definitions/Glob"
|
|
1241
1241
|
},
|
|
@@ -1271,7 +1271,7 @@
|
|
|
1271
1271
|
"type": "string"
|
|
1272
1272
|
},
|
|
1273
1273
|
"ignorePaths": {
|
|
1274
|
-
"description": "Glob patterns of files to be ignored
|
|
1274
|
+
"description": "Glob patterns of files to be ignored.\n\nGlob patterns are relative to the `globRoot` of the configuration file that defines them.",
|
|
1275
1275
|
"items": {
|
|
1276
1276
|
"$ref": "#/definitions/Glob"
|
|
1277
1277
|
},
|
|
@@ -1279,10 +1279,10 @@
|
|
|
1279
1279
|
},
|
|
1280
1280
|
"ignoreRegExpList": {
|
|
1281
1281
|
"$ref": "#/definitions/RegExpPatternList",
|
|
1282
|
-
"description": "List of
|
|
1282
|
+
"description": "List of regular expression patterns or pattern names to exclude from spell checking.\n\nExample: [\"href\"] - to exclude html href.\n\nBy default, several patterns are excluded. See [Configuration](https://cspell.org/configuration/#cspelljson-sections) for more details.\n\nWhile you can create your own patterns, you can also leverage several patterns that are [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22)."
|
|
1283
1283
|
},
|
|
1284
1284
|
"ignoreWords": {
|
|
1285
|
-
"description": "List of words to be ignored. An
|
|
1285
|
+
"description": "List of words to be ignored. An ignored word will not show up as an error, even if it is also in the `flagWords`.",
|
|
1286
1286
|
"items": {
|
|
1287
1287
|
"type": "string"
|
|
1288
1288
|
},
|
|
@@ -1300,23 +1300,23 @@
|
|
|
1300
1300
|
"type": "array"
|
|
1301
1301
|
}
|
|
1302
1302
|
],
|
|
1303
|
-
"description": "
|
|
1303
|
+
"description": "Allows this configuration to inherit configuration for one or more other files.\n\nSee [Importing / Extending Configuration](https://cspell.org/configuration/imports/) for more details."
|
|
1304
1304
|
},
|
|
1305
1305
|
"includeRegExpList": {
|
|
1306
1306
|
"$ref": "#/definitions/RegExpPatternList",
|
|
1307
|
-
"description": "List of
|
|
1307
|
+
"description": "List of regular expression patterns or defined pattern names to match for spell checking.\n\nIf this property is defined, only text matching the included patterns will be checked.\n\nWhile you can create your own patterns, you can also leverage several patterns that are [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22)."
|
|
1308
1308
|
},
|
|
1309
1309
|
"language": {
|
|
1310
1310
|
"$ref": "#/definitions/LocaleId",
|
|
1311
1311
|
"default": "en",
|
|
1312
|
-
"description": "Current active spelling language.\n\
|
|
1312
|
+
"description": "Current active spelling language. This specifies the language locale to use in choosing the general dictionary.\n\nFor example:\n\n- \"en-GB\" for British English.\n- \"en,nl\" to enable both English and Dutch."
|
|
1313
1313
|
},
|
|
1314
1314
|
"languageId": {
|
|
1315
1315
|
"$ref": "#/definitions/LanguageId",
|
|
1316
1316
|
"description": "Forces the spell checker to assume a give language id. Used mainly as an Override."
|
|
1317
1317
|
},
|
|
1318
1318
|
"languageSettings": {
|
|
1319
|
-
"description": "Additional settings for individual languages.",
|
|
1319
|
+
"description": "Additional settings for individual languages.\n\nSee [Language Settings](https://cspell.org/configuration/language-settings/) for more details.",
|
|
1320
1320
|
"items": {
|
|
1321
1321
|
"$ref": "#/definitions/LanguageSetting"
|
|
1322
1322
|
},
|
|
@@ -1364,14 +1364,14 @@
|
|
|
1364
1364
|
"type": "number"
|
|
1365
1365
|
},
|
|
1366
1366
|
"overrides": {
|
|
1367
|
-
"description": "Overrides to apply
|
|
1367
|
+
"description": "Overrides are used to apply settings for specific files in your project.\n\nFor example:\n\n```javascript \"overrides\": [ // Force `*.hrr` and `*.crr` files to be treated as `cpp` files: { \"filename\": \"**/{*.hrr,*.crr}\", \"languageId\": \"cpp\" }, // Force `*.txt` to use the Dutch dictionary (Dutch dictionary needs to be installed separately): { \"language\": \"nl\", \"filename\": \"**/dutch/**/*.txt\" } ] ```",
|
|
1368
1368
|
"items": {
|
|
1369
1369
|
"$ref": "#/definitions/OverrideSettings"
|
|
1370
1370
|
},
|
|
1371
1371
|
"type": "array"
|
|
1372
1372
|
},
|
|
1373
1373
|
"patterns": {
|
|
1374
|
-
"description": "Defines a list of patterns that can be used
|
|
1374
|
+
"description": "Defines a list of patterns that can be used with the `ignoreRegExpList` and `includeRegExpList` options.\n\nFor example:\n\n```javascript \"ignoreRegExpList\": [\"comments\"], \"patterns\": [ { \"name\": \"comment-single-line\", \"pattern\": \"/#.*/g\" }, { \"name\": \"comment-multi-line\", \"pattern\": \"/(?:\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\/)/g\" }, // You can also combine multiple named patterns into one single named pattern { \"name\": \"comments\", \"pattern\": [\"comment-single-line\", \"comment-multi-line\"] } ] ```",
|
|
1375
1375
|
"items": {
|
|
1376
1376
|
"$ref": "#/definitions/RegExpPatternDefinition"
|
|
1377
1377
|
},
|
|
@@ -1440,7 +1440,7 @@
|
|
|
1440
1440
|
"version": {
|
|
1441
1441
|
"$ref": "#/definitions/Version",
|
|
1442
1442
|
"default": "0.2",
|
|
1443
|
-
"description": "Configuration format version of the settings file."
|
|
1443
|
+
"description": "Configuration format version of the settings file.\n\nThis controls how the settings in the configuration file behave."
|
|
1444
1444
|
},
|
|
1445
1445
|
"words": {
|
|
1446
1446
|
"description": "List of words to be always considered correct.",
|
|
@@ -27,12 +27,19 @@ export interface CSpellSettingsWithSourceTrace extends CSpellSettings {
|
|
|
27
27
|
export interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
28
28
|
/**
|
|
29
29
|
* Configuration format version of the settings file.
|
|
30
|
+
*
|
|
31
|
+
* This controls how the settings in the configuration file behave.
|
|
32
|
+
*
|
|
30
33
|
* @default "0.2"
|
|
31
34
|
*/
|
|
32
35
|
version?: Version;
|
|
33
36
|
/** Words to add to global dictionary -- should only be in the user config file. */
|
|
34
37
|
userWords?: string[];
|
|
35
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Allows this configuration to inherit configuration for one or more other files.
|
|
40
|
+
*
|
|
41
|
+
* See [Importing / Extending Configuration](https://cspell.org/configuration/imports/) for more details.
|
|
42
|
+
*/
|
|
36
43
|
import?: FsPath | FsPath[];
|
|
37
44
|
/**
|
|
38
45
|
* The root to use for glob patterns found in this configuration.
|
|
@@ -52,11 +59,13 @@ export interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
|
52
59
|
globRoot?: FSPathResolvable;
|
|
53
60
|
/**
|
|
54
61
|
* Glob patterns of files to be checked.
|
|
62
|
+
*
|
|
55
63
|
* Glob patterns are relative to the `globRoot` of the configuration file that defines them.
|
|
56
64
|
*/
|
|
57
65
|
files?: Glob[];
|
|
58
66
|
/**
|
|
59
67
|
* Enable scanning files and directories beginning with `.` (period).
|
|
68
|
+
*
|
|
60
69
|
* By default, CSpell does not scan `hidden` files.
|
|
61
70
|
*
|
|
62
71
|
* @default false
|
|
@@ -64,11 +73,13 @@ export interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
|
64
73
|
enableGlobDot?: boolean;
|
|
65
74
|
/**
|
|
66
75
|
* Glob patterns of files to be ignored.
|
|
76
|
+
*
|
|
67
77
|
* Glob patterns are relative to the `globRoot` of the configuration file that defines them.
|
|
68
78
|
*/
|
|
69
79
|
ignorePaths?: Glob[];
|
|
70
80
|
/**
|
|
71
81
|
* Prevents searching for local configuration when checking individual documents.
|
|
82
|
+
*
|
|
72
83
|
* @default false
|
|
73
84
|
*/
|
|
74
85
|
noConfigSearch?: boolean;
|
|
@@ -76,6 +87,7 @@ export interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
|
76
87
|
* Indicate that the configuration file should not be modified.
|
|
77
88
|
* This is used to prevent tools like the VS Code Spell Checker from
|
|
78
89
|
* modifying the file to add words and other configuration.
|
|
90
|
+
*
|
|
79
91
|
* @default false
|
|
80
92
|
*/
|
|
81
93
|
readonly?: boolean;
|
|
@@ -99,17 +111,47 @@ export interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
|
99
111
|
*/
|
|
100
112
|
features?: Features;
|
|
101
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* In the below JSDoc comment, we helpfully specify an example configuration for the end-user to
|
|
116
|
+
* reference. And this example will get captured by the automatic documentation generator.
|
|
117
|
+
*
|
|
118
|
+
* However, specifying the glob pattern inside of a JSDoc is tricky, because the glob contains the
|
|
119
|
+
* same symbol as the end-of-JSDoc symbol. To work around this, we insert a zero-width space in
|
|
120
|
+
* between the "*" and the "/" symbols.
|
|
121
|
+
*/
|
|
102
122
|
export interface ExtendableSettings extends Settings {
|
|
103
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Overrides are used to apply settings for specific files in your project.
|
|
125
|
+
*
|
|
126
|
+
* For example:
|
|
127
|
+
*
|
|
128
|
+
* ```javascript
|
|
129
|
+
* "overrides": [
|
|
130
|
+
* // Force `*.hrr` and `*.crr` files to be treated as `cpp` files:
|
|
131
|
+
* {
|
|
132
|
+
* "filename": "**/{*.hrr,*.crr}",
|
|
133
|
+
* "languageId": "cpp"
|
|
134
|
+
* },
|
|
135
|
+
* // Force `*.txt` to use the Dutch dictionary (Dutch dictionary needs to be installed separately):
|
|
136
|
+
* {
|
|
137
|
+
* "language": "nl",
|
|
138
|
+
* "filename": "**/dutch/**/*.txt"
|
|
139
|
+
* }
|
|
140
|
+
* ]
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
104
143
|
overrides?: OverrideSettings[];
|
|
105
144
|
}
|
|
106
145
|
export interface Settings extends ReportingConfiguration, BaseSetting, PnPSettings {
|
|
107
146
|
/**
|
|
108
|
-
* Current active spelling language.
|
|
147
|
+
* Current active spelling language. This specifies the language locale to use in choosing the
|
|
148
|
+
* general dictionary.
|
|
149
|
+
*
|
|
150
|
+
* For example:
|
|
109
151
|
*
|
|
110
|
-
*
|
|
152
|
+
* - "en-GB" for British English.
|
|
153
|
+
* - "en,nl" to enable both English and Dutch.
|
|
111
154
|
*
|
|
112
|
-
* Example: "en,nl" to enable both English and Dutch.
|
|
113
155
|
* @default "en"
|
|
114
156
|
*/
|
|
115
157
|
language?: LocaleId;
|
|
@@ -132,13 +174,18 @@ export interface Settings extends ReportingConfiguration, BaseSetting, PnPSettin
|
|
|
132
174
|
* ```
|
|
133
175
|
*/
|
|
134
176
|
enableFiletypes?: LanguageIdSingle[];
|
|
135
|
-
/**
|
|
177
|
+
/**
|
|
178
|
+
* Additional settings for individual languages.
|
|
179
|
+
*
|
|
180
|
+
* See [Language Settings](https://cspell.org/configuration/language-settings/) for more details.
|
|
181
|
+
*/
|
|
136
182
|
languageSettings?: LanguageSetting[];
|
|
137
183
|
/** Forces the spell checker to assume a give language id. Used mainly as an Override. */
|
|
138
184
|
languageId?: LanguageId;
|
|
139
185
|
/**
|
|
140
186
|
* By default, the bundled dictionary configurations are loaded. Explicitly setting this to `false`
|
|
141
187
|
* will prevent ALL default configuration from being loaded.
|
|
188
|
+
*
|
|
142
189
|
* @default true
|
|
143
190
|
*/
|
|
144
191
|
loadDefaultConfiguration?: boolean;
|
|
@@ -146,16 +193,19 @@ export interface Settings extends ReportingConfiguration, BaseSetting, PnPSettin
|
|
|
146
193
|
export interface ReportingConfiguration extends SuggestionsConfiguration {
|
|
147
194
|
/**
|
|
148
195
|
* The maximum number of problems to report in a file.
|
|
196
|
+
*
|
|
149
197
|
* @default 100
|
|
150
198
|
*/
|
|
151
199
|
maxNumberOfProblems?: number;
|
|
152
200
|
/**
|
|
153
201
|
* The maximum number of times the same word can be flagged as an error in a file.
|
|
202
|
+
*
|
|
154
203
|
* @default 5
|
|
155
204
|
*/
|
|
156
205
|
maxDuplicateProblems?: number;
|
|
157
206
|
/**
|
|
158
207
|
* The minimum length of a word before checking it against a dictionary.
|
|
208
|
+
*
|
|
159
209
|
* @default 4
|
|
160
210
|
*/
|
|
161
211
|
minWordLength?: number;
|
|
@@ -163,11 +213,13 @@ export interface ReportingConfiguration extends SuggestionsConfiguration {
|
|
|
163
213
|
export interface SuggestionsConfiguration {
|
|
164
214
|
/**
|
|
165
215
|
* Number of suggestions to make.
|
|
216
|
+
*
|
|
166
217
|
* @default 10
|
|
167
218
|
*/
|
|
168
219
|
numSuggestions?: number;
|
|
169
220
|
/**
|
|
170
221
|
* The maximum amount of time in milliseconds to generate suggestions for a word.
|
|
222
|
+
*
|
|
171
223
|
* @default 500
|
|
172
224
|
*/
|
|
173
225
|
suggestionsTimeout?: number;
|
|
@@ -177,6 +229,7 @@ export interface SuggestionsConfiguration {
|
|
|
177
229
|
* For example, appending an `s` onto `example` -> `examples` is considered 1 change.
|
|
178
230
|
*
|
|
179
231
|
* Range: between 1 and 5.
|
|
232
|
+
*
|
|
180
233
|
* @default 3
|
|
181
234
|
*/
|
|
182
235
|
suggestionNumChanges?: number;
|
|
@@ -310,10 +363,14 @@ export interface BaseSetting {
|
|
|
310
363
|
words?: string[];
|
|
311
364
|
/** List of words to always be considered incorrect. */
|
|
312
365
|
flagWords?: string[];
|
|
313
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* List of words to be ignored. An ignored word will not show up as an error, even if it is
|
|
368
|
+
* also in the `flagWords`.
|
|
369
|
+
*/
|
|
314
370
|
ignoreWords?: string[];
|
|
315
371
|
/**
|
|
316
|
-
* True to enable compound word checking.
|
|
372
|
+
* True to enable compound word checking. See [Case Sensitivity](https://cspell.org/docs/case-sensitive/) for more details.
|
|
373
|
+
*
|
|
317
374
|
* @default false
|
|
318
375
|
*/
|
|
319
376
|
allowCompoundWords?: boolean;
|
|
@@ -327,13 +384,28 @@ export interface BaseSetting {
|
|
|
327
384
|
* @default false
|
|
328
385
|
*/
|
|
329
386
|
caseSensitive?: boolean;
|
|
330
|
-
/**
|
|
387
|
+
/**
|
|
388
|
+
* Define additional available dictionaries.
|
|
389
|
+
*
|
|
390
|
+
* For example, you can use the following to add a custom dictionary:
|
|
391
|
+
*
|
|
392
|
+
* ```json
|
|
393
|
+
* "dictionaryDefinitions": [
|
|
394
|
+
* { "name": "custom-words", "path": "./custom-words.txt"}
|
|
395
|
+
* ],
|
|
396
|
+
* "dictionaries": ["custom-words"]
|
|
397
|
+
* ```
|
|
398
|
+
*/
|
|
331
399
|
dictionaryDefinitions?: DictionaryDefinition[];
|
|
332
400
|
/**
|
|
333
|
-
* Optional list of dictionaries to use.
|
|
334
|
-
*
|
|
335
|
-
* To remove a dictionary from the list add `!` before the name.
|
|
336
|
-
*
|
|
401
|
+
* Optional list of dictionaries to use. Each entry should match the name of the dictionary.
|
|
402
|
+
*
|
|
403
|
+
* To remove a dictionary from the list, add `!` before the name.
|
|
404
|
+
*
|
|
405
|
+
* For example, `!typescript` will turn off the dictionary with the name `typescript`.
|
|
406
|
+
*
|
|
407
|
+
* See the [Dictionaries](https://cspell.org/docs/dictionaries/)
|
|
408
|
+
* and [Custom Dictionaries](https://cspell.org/docs/dictionaries-custom/) for more details.
|
|
337
409
|
*/
|
|
338
410
|
dictionaries?: DictionaryReference[];
|
|
339
411
|
/**
|
|
@@ -347,17 +419,51 @@ export interface BaseSetting {
|
|
|
347
419
|
*/
|
|
348
420
|
noSuggestDictionaries?: DictionaryReference[];
|
|
349
421
|
/**
|
|
350
|
-
* List of
|
|
422
|
+
* List of regular expression patterns or pattern names to exclude from spell checking.
|
|
351
423
|
*
|
|
352
424
|
* Example: ["href"] - to exclude html href.
|
|
425
|
+
*
|
|
426
|
+
* By default, several patterns are excluded. See
|
|
427
|
+
* [Configuration](https://cspell.org/configuration/#cspelljson-sections) for more details.
|
|
428
|
+
*
|
|
429
|
+
* While you can create your own patterns, you can also leverage several patterns that are
|
|
430
|
+
* [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22).
|
|
353
431
|
*/
|
|
354
432
|
ignoreRegExpList?: RegExpPatternList;
|
|
355
433
|
/**
|
|
356
|
-
* List of
|
|
357
|
-
*
|
|
434
|
+
* List of regular expression patterns or defined pattern names to match for spell checking.
|
|
435
|
+
*
|
|
436
|
+
* If this property is defined, only text matching the included patterns will be checked.
|
|
437
|
+
*
|
|
438
|
+
* While you can create your own patterns, you can also leverage several patterns that are
|
|
439
|
+
* [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22).
|
|
358
440
|
*/
|
|
359
441
|
includeRegExpList?: RegExpPatternList;
|
|
360
|
-
/**
|
|
442
|
+
/**
|
|
443
|
+
* Defines a list of patterns that can be used with the `ignoreRegExpList` and
|
|
444
|
+
* `includeRegExpList` options.
|
|
445
|
+
*
|
|
446
|
+
* For example:
|
|
447
|
+
*
|
|
448
|
+
* ```javascript
|
|
449
|
+
* "ignoreRegExpList": ["comments"],
|
|
450
|
+
* "patterns": [
|
|
451
|
+
* {
|
|
452
|
+
* "name": "comment-single-line",
|
|
453
|
+
* "pattern": "/#.*/g"
|
|
454
|
+
* },
|
|
455
|
+
* {
|
|
456
|
+
* "name": "comment-multi-line",
|
|
457
|
+
* "pattern": "/(?:\\/\\*[\\s\\S]*?\\*\\/)/g"
|
|
458
|
+
* },
|
|
459
|
+
* // You can also combine multiple named patterns into one single named pattern
|
|
460
|
+
* {
|
|
461
|
+
* "name": "comments",
|
|
462
|
+
* "pattern": ["comment-single-line", "comment-multi-line"]
|
|
463
|
+
* }
|
|
464
|
+
* ]
|
|
465
|
+
* ```
|
|
466
|
+
*/
|
|
361
467
|
patterns?: RegExpPatternDefinition[];
|
|
362
468
|
}
|
|
363
469
|
export declare type DictionaryFileTypes = 'S' | 'W' | 'C' | 'T';
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "5.
|
|
6
|
+
"version": "5.21.0",
|
|
7
7
|
"description": "Types for cspell and cspell-lib",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"typings": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build": "npm run compile && npm run build-schema",
|
|
19
19
|
"build-dev": "tsc -p tsconfig.dev.json",
|
|
20
20
|
"build-schema": "ts-json-schema-generator --no-top-ref --path src/CSpellSettingsDef.ts --type CSpellSettings --validation-keywords markdownDescription --validation-keywords scope --validation-keywords deprecated --validation-keywords deprecationMessage -o ./cspell.schema.json && cp ./cspell.schema.json ../..",
|
|
21
|
-
"build-docs": "rimraf ../../docs/types/cspell-types && typedoc --out ../../docs/types/cspell-types src/index.ts",
|
|
21
|
+
"build-cspell-types-docs": "rimraf ../../docs/types/cspell-types && typedoc --out ../../docs/types/cspell-types src/index.ts",
|
|
22
22
|
"test-build-docs": "typedoc --out ./temp/docs src/index.ts",
|
|
23
23
|
"clean-build": "npm run clean && npm run build",
|
|
24
24
|
"compile": "tsc -p .",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"ajv-cli": "^5.0.0",
|
|
53
|
-
"jest": "^
|
|
53
|
+
"jest": "^28.1.0",
|
|
54
54
|
"rimraf": "^3.0.2",
|
|
55
55
|
"ts-json-schema-generator": "^1.0.0",
|
|
56
|
-
"typedoc": "0.22.
|
|
57
|
-
"typedoc-plugin-markdown": "^3.
|
|
58
|
-
"typescript": "^4.6.
|
|
56
|
+
"typedoc": "0.22.15",
|
|
57
|
+
"typedoc-plugin-markdown": "^3.12.1",
|
|
58
|
+
"typescript": "^4.6.4"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "d0758cb805404cb62b7a0c6c852c337f2122ead0"
|
|
61
61
|
}
|