cspell 10.0.0 → 10.1.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.
@@ -1,401 +0,0 @@
1
- import { CSpellReporter, CSpellSettings, CacheFormat, CacheStrategy, ReporterConfiguration, RunResult } from "@cspell/cspell-types";
2
- import { GlobMatcher } from "cspell-glob";
3
- //#region src/util/cache/CacheOptions.d.ts
4
- interface CacheOptions {
5
- /**
6
- * The version of `cspell` that made the cache entry.
7
- * Cache entries must match the `major.minor` version.
8
- */
9
- version: string;
10
- /**
11
- * Store the info about processed files in order to only operate on the changed ones.
12
- */
13
- cache?: boolean;
14
- /**
15
- * Path to the cache location. Can be a file or a directory.
16
- * If none specified .cspellcache will be used.
17
- * The file will be created in the directory where the cspell command is executed.
18
- */
19
- cacheLocation?: string;
20
- /**
21
- * Strategy to use for detecting changed files, default: metadata
22
- */
23
- cacheStrategy?: CacheStrategy;
24
- /**
25
- * Resets the cache
26
- */
27
- cacheReset?: boolean;
28
- /**
29
- * Format of the cache file.
30
- * - `legacy` - use absolute paths in the cache file
31
- * - `universal` - use a sharable format.
32
- * @default 'legacy'
33
- */
34
- cacheFormat?: CacheFormat;
35
- }
36
- //#endregion
37
- //#region src/reporters/LintFileResult.d.ts
38
- type FinalizedReporter = Required<CSpellReporter>;
39
- //#endregion
40
- //#region src/options.d.ts
41
- interface LinterOptions extends Omit<BaseOptions, "config">, Omit<CacheOptions, "version">, ReporterConfiguration {
42
- /**
43
- * Display verbose information
44
- */
45
- verbose?: boolean;
46
- /**
47
- * Level of verbosity (higher number = more verbose).
48
- */
49
- verboseLevel?: number;
50
- /**
51
- * Show extensive output.
52
- */
53
- debug?: boolean;
54
- /**
55
- * a globs to exclude files from being checked.
56
- */
57
- exclude?: string[] | string;
58
- /**
59
- * Only report the words, no line numbers or file names.
60
- */
61
- wordsOnly?: boolean;
62
- /**
63
- * unique errors per file only.
64
- */
65
- unique?: boolean;
66
- /**
67
- * root directory, defaults to `cwd`
68
- */
69
- root?: string;
70
- /**
71
- * Determine if files / directories starting with `.` should be part
72
- * of the glob search.
73
- * @default false
74
- */
75
- dot?: boolean;
76
- /**
77
- * Show part of a line where an issue is found.
78
- * - if true, it will show the default number of characters on either side.
79
- * - if a number, the number of characters to show on either side of the issue.
80
- */
81
- showContext?: boolean | number;
82
- /**
83
- * Show suggestions for spelling errors.
84
- */
85
- showSuggestions?: boolean;
86
- /**
87
- * Enable filtering out files matching globs found in `.gitignore` files.
88
- */
89
- gitignore?: boolean;
90
- /**
91
- * Stop searching for a `.gitignore`s when a root is reached.
92
- */
93
- gitignoreRoot?: string | string[];
94
- /**
95
- * List of files that contains the paths to files to be spell checked.
96
- * The files in the lists will be filtered against the glob patterns.
97
- * - an entry of `stdin` means to read the file list from **`stdin`**
98
- * The resulting files are filtered against the `files` globs found in the configuration.
99
- */
100
- fileList?: string[] | undefined;
101
- /**
102
- * List of file paths to spell check. These can be relative or absolute
103
- * paths, but not Globs. Relative paths are relative to {@link LinterOptions.root}.
104
- * The files are combined with the file paths read from {@link LinterOptions.fileList}.
105
- * These files are filtered against the `files` globs found in the configuration.
106
- */
107
- files?: string[] | undefined;
108
- /**
109
- * Alias of {@link LinterOptions.files}.
110
- */
111
- file?: string[] | undefined;
112
- /**
113
- * Use the `files` configuration to filter the files found.
114
- */
115
- filterFiles?: boolean | undefined;
116
- /**
117
- * Files must be found and processed otherwise it is considered an error.
118
- */
119
- mustFindFiles?: boolean;
120
- /**
121
- * List of dictionary names to use.
122
- */
123
- dictionary?: string[] | undefined;
124
- /**
125
- * List of dictionary names to disable.
126
- */
127
- disableDictionary?: string[] | undefined;
128
- /**
129
- * Stop processing and exit if an issue or error is found.
130
- */
131
- failFast?: boolean;
132
- /**
133
- * Keep going even if an error is found.
134
- */
135
- continueOnError?: boolean;
136
- /**
137
- * Optional list of reporters to use, overriding any specified in the
138
- * configuration.
139
- */
140
- reporter?: string[];
141
- /**
142
- * Load and parse documents, but do not spell check.
143
- */
144
- skipValidation?: boolean;
145
- /**
146
- * Path to configuration file.
147
- */
148
- config?: string | CSpellConfigFile;
149
- /**
150
- * Specify the maximum file size to be checked.
151
- * The value can include a units suffix: `KB`, `MB`, `B`, `GB`.
152
- * The numeric value can include a decimal.
153
- * Example: 1.5MB
154
- */
155
- maxFileSize?: string | undefined;
156
- }
157
- interface TraceOptions extends BaseOptions {
158
- /**
159
- * Use stdin for the input.
160
- */
161
- stdin?: boolean;
162
- /**
163
- * Enable the `allowCompoundWords` option.
164
- */
165
- allowCompoundWords?: boolean;
166
- /**
167
- * Ignore case and accents when searching for words.
168
- */
169
- ignoreCase?: boolean;
170
- /**
171
- * Show all dictionaries, not just the ones that contain the words or are enabled.
172
- */
173
- all?: boolean;
174
- /**
175
- * Show only dictionaries that contain the words.
176
- * If `all` is set, this option is ignored.
177
- */
178
- onlyFound?: boolean;
179
- /**
180
- * Names of dictionaries to use.
181
- */
182
- dictionary?: string[] | undefined;
183
- /**
184
- * Configure how to display the dictionary path.
185
- */
186
- dictionaryPath?: "hide" | "long" | "short" | "full";
187
- }
188
- interface SuggestionOptions extends BaseOptions {
189
- /**
190
- * Strict case and accent checking
191
- * @default true
192
- */
193
- strict?: boolean;
194
- /**
195
- * List of dictionaries to use. If specified, only that list of dictionaries will be used.
196
- */
197
- dictionaries?: string[] | undefined;
198
- /**
199
- * The number of suggestions to make.
200
- * @default 8
201
- */
202
- numSuggestions?: number;
203
- /**
204
- * Max number of changes / edits to the word to get to a suggestion matching suggestion.
205
- * @default 4
206
- */
207
- numChanges?: number;
208
- /**
209
- * If multiple suggestions have the same edit / change "cost", then included them even if
210
- * it causes more than `numSuggestions` to be returned.
211
- * @default true
212
- */
213
- includeTies?: boolean;
214
- /**
215
- * Use stdin for the input
216
- */
217
- useStdin?: boolean | undefined;
218
- /**
219
- * Use REPL interface for making suggestions.
220
- */
221
- repl?: boolean;
222
- }
223
- interface DictionariesOptions {
224
- /**
225
- * Path to configuration file.
226
- */
227
- config?: string;
228
- /**
229
- * Load the default configuration
230
- * @default true
231
- */
232
- defaultConfiguration?: boolean;
233
- /**
234
- * Use color in the output.
235
- * `true` to force color, `false` to turn off color.
236
- * `undefined` to use color if the output is a TTY.
237
- */
238
- color?: boolean | undefined;
239
- /**
240
- * Show enabled:
241
- * - `true` to show only enabled dictionaries.
242
- * - `false` to show only disabled dictionaries.
243
- * - `undefined` to show all dictionaries.
244
- */
245
- enabled?: boolean | undefined;
246
- /**
247
- * The locale to use when listing dictionaries.
248
- */
249
- locale?: string;
250
- /**
251
- * The file type to use when listing dictionaries.
252
- */
253
- fileType?: string;
254
- /**
255
- * show the language locales supported by the dictionary.
256
- */
257
- showLocales?: boolean;
258
- /**
259
- * show the file types supported by the dictionary.
260
- */
261
- showFileTypes?: boolean;
262
- /**
263
- * Dhow the location of the dictionary.
264
- */
265
- showLocation?: boolean;
266
- pathFormat?: "hide" | "short" | "long" | "full";
267
- }
268
- interface LegacyOptions {
269
- local?: string;
270
- }
271
- interface BaseOptions {
272
- /**
273
- * Path to configuration file.
274
- */
275
- config?: string;
276
- /**
277
- * Programming Language ID.
278
- */
279
- languageId?: string;
280
- /**
281
- * Locale to use.
282
- */
283
- locale?: string;
284
- /**
285
- * Load the default configuration
286
- * @default true
287
- */
288
- defaultConfiguration?: boolean;
289
- /**
290
- * Check In-Document CSpell directives for correctness.
291
- */
292
- validateDirectives?: boolean;
293
- /**
294
- * Return an exit code if there are issues found.
295
- * @default true
296
- */
297
- exitCode?: boolean;
298
- /**
299
- * Execution flags.
300
- * Used primarily for releasing experimental features.
301
- * Flags are of the form key:value
302
- */
303
- flag?: string[];
304
- /**
305
- * Use color in the output.
306
- * `true` to force color, `false` to turn off color.
307
- * `undefined` to use color if the output is a TTY.
308
- */
309
- color?: boolean | undefined;
310
- }
311
- interface LinterCliOptions extends LinterOptions {
312
- /**
313
- * Show legacy output
314
- */
315
- legacy?: boolean;
316
- /**
317
- * Show summary at the end
318
- */
319
- summary?: boolean;
320
- /**
321
- * Show issues
322
- */
323
- issues?: boolean;
324
- /**
325
- * Run in silent mode.
326
- * @default false
327
- */
328
- silent?: boolean;
329
- /**
330
- * Show progress
331
- */
332
- progress?: boolean;
333
- /**
334
- * issues are shown with a relative path to the root or `cwd`
335
- */
336
- relative?: boolean;
337
- /**
338
- * Files must be found or cli will exit with an error.
339
- */
340
- mustFindFiles?: boolean;
341
- /**
342
- * Generate a summary report of issues.
343
- */
344
- issuesSummaryReport?: boolean;
345
- /**
346
- * Generate a summary report of performance.
347
- */
348
- showPerfSummary?: boolean;
349
- /**
350
- * Set the template to use when reporting issues.
351
- *
352
- * The template is a string that can contain the following placeholders:
353
- * - `$filename` - the file name
354
- * - `$col` - the column number
355
- * - `$row` - the row number
356
- * - `$text` - the word that is misspelled
357
- * - `$message` - the issues message: "unknown word", "word is misspelled", etc.
358
- * - `$messageColored` - the issues message with color based upon the message type.
359
- * - `$uri` - the URI of the file
360
- * - `$suggestions` - suggestions for the misspelled word (if requested)
361
- * - `$quickFix` - possible quick fixes for the misspelled word.
362
- * - `$contextFull` - the full context of the misspelled word.
363
- * - `$contextLeft` - the context to the left of the misspelled word.
364
- * - `$contextRight` - the context to the right of the misspelled word.
365
- *
366
- * Color is supported using the following template pattern:
367
- * - `{<style[.style]> <text>}` - where `<style>` is a style name and `<text>` is the text to style.
368
- *
369
- * Styles
370
- * - `bold`, `italic`, `underline`, `strikethrough`, `dim`, `inverse`
371
- * - `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`
372
- *
373
- * Example:
374
- * @example "{green $filename}:{yellow $row}:{yellow $col} $message {red $text} $quickFix {dim $suggestions}"
375
- * @since 8.12.0
376
- */
377
- issueTemplate?: string;
378
- /**
379
- * Prevents searching for local configuration files
380
- *
381
- * When `--no-config-search` is passed on the command line, this will be `true`.
382
- * If the flag is not passed, it defaults to `false`.
383
- */
384
- configSearch?: boolean;
385
- /**
386
- * Directory paths at which CSpell should stop searching for configuration files.
387
- *
388
- * These are set via one or more `--stop-config-search-at <dir>` CLI options.
389
- * If no flags are passed, this will be `undefined`.
390
- */
391
- stopConfigSearchAt?: string[];
392
- report?: ReportChoices | undefined;
393
- }
394
- type ReportChoices = "all" | "simple" | "typos" | "flagged";
395
- interface CSpellConfigFile {
396
- url: URL;
397
- settings: CSpellSettings;
398
- }
399
- //#endregion
400
- export { SuggestionOptions as a, LinterCliOptions as i, DictionariesOptions as n, TraceOptions as o, LegacyOptions as r, FinalizedReporter as s, BaseOptions as t };
401
- //# sourceMappingURL=options-1v2EW2_1.d.ts.map