cspell-lib 8.19.0 → 8.19.2
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.
|
@@ -60,7 +60,14 @@ export declare class DocumentValidator {
|
|
|
60
60
|
*/
|
|
61
61
|
get prepTime(): number;
|
|
62
62
|
get validateDirectives(): boolean;
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Check a range of text for validation issues.
|
|
65
|
+
* @param range - the range of text to check.
|
|
66
|
+
* @param _text - the text to check. If not given, the text will be taken from the document.
|
|
67
|
+
* @param scope - the scope to use for validation. If not given, the default scope will be used.
|
|
68
|
+
* @returns the validation issues.
|
|
69
|
+
*/
|
|
70
|
+
checkText(range: SimpleRange, _text: string | undefined, scope?: string[] | string): ValidationIssue[];
|
|
64
71
|
check(parsedText: ParsedText): ValidationIssue[];
|
|
65
72
|
/**
|
|
66
73
|
* Check a Document for Validation Issues.
|
|
@@ -152,9 +152,17 @@ export class DocumentValidator {
|
|
|
152
152
|
get validateDirectives() {
|
|
153
153
|
return this.options.validateDirectives ?? this._preparations?.config.validateDirectives ?? false;
|
|
154
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Check a range of text for validation issues.
|
|
157
|
+
* @param range - the range of text to check.
|
|
158
|
+
* @param _text - the text to check. If not given, the text will be taken from the document.
|
|
159
|
+
* @param scope - the scope to use for validation. If not given, the default scope will be used.
|
|
160
|
+
* @returns the validation issues.
|
|
161
|
+
*/
|
|
155
162
|
checkText(range, _text, scope) {
|
|
156
163
|
const text = this._document.text.slice(range[0], range[1]);
|
|
157
|
-
|
|
164
|
+
scope = (Array.isArray(scope) ? scope.join(' ') : scope) || '';
|
|
165
|
+
return this.check({ text, range, scope });
|
|
158
166
|
}
|
|
159
167
|
check(parsedText) {
|
|
160
168
|
assert(this._ready);
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"provenance": true
|
|
6
6
|
},
|
|
7
|
-
"version": "8.19.
|
|
7
|
+
"version": "8.19.2",
|
|
8
8
|
"description": "A library of useful functions used across various cspell tools.",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": false,
|
|
@@ -64,22 +64,22 @@
|
|
|
64
64
|
},
|
|
65
65
|
"homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-lib#readme",
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@cspell/cspell-bundled-dicts": "8.19.
|
|
68
|
-
"@cspell/cspell-pipe": "8.19.
|
|
69
|
-
"@cspell/cspell-resolver": "8.19.
|
|
70
|
-
"@cspell/cspell-types": "8.19.
|
|
71
|
-
"@cspell/dynamic-import": "8.19.
|
|
72
|
-
"@cspell/filetypes": "8.19.
|
|
73
|
-
"@cspell/strong-weak-map": "8.19.
|
|
74
|
-
"@cspell/url": "8.19.
|
|
67
|
+
"@cspell/cspell-bundled-dicts": "8.19.2",
|
|
68
|
+
"@cspell/cspell-pipe": "8.19.2",
|
|
69
|
+
"@cspell/cspell-resolver": "8.19.2",
|
|
70
|
+
"@cspell/cspell-types": "8.19.2",
|
|
71
|
+
"@cspell/dynamic-import": "8.19.2",
|
|
72
|
+
"@cspell/filetypes": "8.19.2",
|
|
73
|
+
"@cspell/strong-weak-map": "8.19.2",
|
|
74
|
+
"@cspell/url": "8.19.2",
|
|
75
75
|
"clear-module": "^4.1.2",
|
|
76
76
|
"comment-json": "^4.2.5",
|
|
77
|
-
"cspell-config-lib": "8.19.
|
|
78
|
-
"cspell-dictionary": "8.19.
|
|
79
|
-
"cspell-glob": "8.19.
|
|
80
|
-
"cspell-grammar": "8.19.
|
|
81
|
-
"cspell-io": "8.19.
|
|
82
|
-
"cspell-trie-lib": "8.19.
|
|
77
|
+
"cspell-config-lib": "8.19.2",
|
|
78
|
+
"cspell-dictionary": "8.19.2",
|
|
79
|
+
"cspell-glob": "8.19.2",
|
|
80
|
+
"cspell-grammar": "8.19.2",
|
|
81
|
+
"cspell-io": "8.19.2",
|
|
82
|
+
"cspell-trie-lib": "8.19.2",
|
|
83
83
|
"env-paths": "^3.0.0",
|
|
84
84
|
"fast-equals": "^5.2.2",
|
|
85
85
|
"gensequence": "^7.0.0",
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"@cspell/dict-csharp": "^4.0.6",
|
|
98
98
|
"@cspell/dict-css": "^4.0.17",
|
|
99
99
|
"@cspell/dict-fa-ir": "^4.0.3",
|
|
100
|
-
"@cspell/dict-fr-fr": "^2.
|
|
100
|
+
"@cspell/dict-fr-fr": "^2.3.0",
|
|
101
101
|
"@cspell/dict-html": "^4.0.11",
|
|
102
|
-
"@cspell/dict-nl-nl": "^2.
|
|
102
|
+
"@cspell/dict-nl-nl": "^2.4.0",
|
|
103
103
|
"@cspell/dict-python": "^4.2.17",
|
|
104
104
|
"@types/configstore": "^6.0.2",
|
|
105
105
|
"configstore": "^7.0.0",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"lorem-ipsum": "^2.0.8",
|
|
109
109
|
"perf-insight": "^1.2.0"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "f630ececa8cd91420aaaaa81c4ad910039457a06"
|
|
112
112
|
}
|