@cspell/cspell-types 6.7.0 → 6.8.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 +16 -0
- package/dist/CSpellReporter.d.ts +18 -0
- package/dist/CSpellReporter.js +6 -1
- package/dist/CSpellSettingsDef.d.ts +12 -0
- package/dist/configFields.js +1 -0
- package/package.json +2 -2
package/cspell.schema.json
CHANGED
|
@@ -2,9 +2,21 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"additionalProperties": false,
|
|
4
4
|
"definitions": {
|
|
5
|
+
"CacheFormat": {
|
|
6
|
+
"enum": [
|
|
7
|
+
"legacy",
|
|
8
|
+
"universal"
|
|
9
|
+
],
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
5
12
|
"CacheSettings": {
|
|
6
13
|
"additionalProperties": false,
|
|
7
14
|
"properties": {
|
|
15
|
+
"cacheFormat": {
|
|
16
|
+
"$ref": "#/definitions/CacheFormat",
|
|
17
|
+
"default": "legacy",
|
|
18
|
+
"description": "Format of the cache file.\n- `legacy` - use absolute paths in the cache file\n- `universal` - use a sharable format."
|
|
19
|
+
},
|
|
8
20
|
"cacheLocation": {
|
|
9
21
|
"$ref": "#/definitions/FSPathResolvable",
|
|
10
22
|
"description": "Path to the cache location. Can be a file or a directory. If none specified `.cspellcache` will be used. Relative paths are relative to the config file in which it is defined.\n\nA prefix of `${cwd}` is replaced with the current working directory."
|
|
@@ -1461,6 +1473,10 @@
|
|
|
1461
1473
|
},
|
|
1462
1474
|
"type": "array"
|
|
1463
1475
|
},
|
|
1476
|
+
"validateDirectives": {
|
|
1477
|
+
"description": "Verify that the in-document directives are correct.",
|
|
1478
|
+
"type": "boolean"
|
|
1479
|
+
},
|
|
1464
1480
|
"version": {
|
|
1465
1481
|
"$ref": "#/definitions/Version",
|
|
1466
1482
|
"default": "0.2",
|
package/dist/CSpellReporter.d.ts
CHANGED
|
@@ -2,8 +2,26 @@ import { TextDocumentOffset, TextOffset } from './TextOffset';
|
|
|
2
2
|
export interface Issue extends Omit<TextDocumentOffset, 'doc'> {
|
|
3
3
|
/** text surrounding the issue text */
|
|
4
4
|
context: TextOffset;
|
|
5
|
+
/**
|
|
6
|
+
* true if the issue has been flagged as a forbidden word.
|
|
7
|
+
*/
|
|
5
8
|
isFlagged?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* An optional array of replacement strings.
|
|
11
|
+
*/
|
|
6
12
|
suggestions?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Issues are spelling issues unless otherwise specified.
|
|
15
|
+
*/
|
|
16
|
+
issueType?: IssueType;
|
|
17
|
+
/**
|
|
18
|
+
* Optional message to show.
|
|
19
|
+
*/
|
|
20
|
+
message?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare enum IssueType {
|
|
23
|
+
spelling = 0,
|
|
24
|
+
directive = 1
|
|
7
25
|
}
|
|
8
26
|
export declare type MessageType = 'Debug' | 'Info' | 'Warning';
|
|
9
27
|
export declare type MessageTypeLookup = {
|
package/dist/CSpellReporter.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageTypes = void 0;
|
|
3
|
+
exports.MessageTypes = exports.IssueType = void 0;
|
|
4
|
+
var IssueType;
|
|
5
|
+
(function (IssueType) {
|
|
6
|
+
IssueType[IssueType["spelling"] = 0] = "spelling";
|
|
7
|
+
IssueType[IssueType["directive"] = 1] = "directive";
|
|
8
|
+
})(IssueType = exports.IssueType || (exports.IssueType = {}));
|
|
4
9
|
exports.MessageTypes = {
|
|
5
10
|
Debug: 'Debug',
|
|
6
11
|
Info: 'Info',
|
|
@@ -108,6 +108,10 @@ export interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
|
108
108
|
* Tells the spell checker to searching for `.gitignore` files when it reaches a matching root.
|
|
109
109
|
*/
|
|
110
110
|
gitignoreRoot?: FsPath | FsPath[];
|
|
111
|
+
/**
|
|
112
|
+
* Verify that the in-document directives are correct.
|
|
113
|
+
*/
|
|
114
|
+
validateDirectives?: boolean;
|
|
111
115
|
/**
|
|
112
116
|
* Configure CSpell features.
|
|
113
117
|
*
|
|
@@ -265,6 +269,7 @@ export interface PnPSettings {
|
|
|
265
269
|
* - `content` - uses a hash of the file content to check file changes (slower - more accurate).
|
|
266
270
|
*/
|
|
267
271
|
export declare type CacheStrategy = 'metadata' | 'content';
|
|
272
|
+
export declare type CacheFormat = 'legacy' | 'universal';
|
|
268
273
|
export interface CacheSettings {
|
|
269
274
|
/**
|
|
270
275
|
* Store the results of processed files in order to only operate on the changed ones.
|
|
@@ -285,6 +290,13 @@ export interface CacheSettings {
|
|
|
285
290
|
* @default 'metadata'
|
|
286
291
|
*/
|
|
287
292
|
cacheStrategy?: CacheStrategy;
|
|
293
|
+
/**
|
|
294
|
+
* Format of the cache file.
|
|
295
|
+
* - `legacy` - use absolute paths in the cache file
|
|
296
|
+
* - `universal` - use a sharable format.
|
|
297
|
+
* @default 'legacy'
|
|
298
|
+
*/
|
|
299
|
+
cacheFormat?: CacheFormat | undefined;
|
|
288
300
|
}
|
|
289
301
|
/**
|
|
290
302
|
* These are settings only used by the command line application.
|
package/dist/configFields.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "6.
|
|
6
|
+
"version": "6.8.0",
|
|
7
7
|
"description": "Types for cspell and cspell-lib",
|
|
8
8
|
"type": "commonjs",
|
|
9
9
|
"main": "dist/index.js",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"ts-json-schema-generator": "^1.0.0",
|
|
70
70
|
"typescript": "^4.7.4"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "8a1bd03222ffc9776c2cdd09180db6150abb3f25"
|
|
73
73
|
}
|