cspell 9.1.2 → 9.1.5

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.
Files changed (152) hide show
  1. package/README.md +29 -21
  2. package/bin.mjs +1 -1
  3. package/dist/esm/app.d.ts +19 -0
  4. package/dist/esm/app.js +1033 -0
  5. package/dist/esm/application-D-NwS6qb.js +2573 -0
  6. package/dist/esm/application-DbOQYm56.d.ts +116 -0
  7. package/dist/esm/application.d.ts +3 -0
  8. package/dist/esm/application.js +3 -0
  9. package/dist/esm/index.d.ts +55 -0
  10. package/dist/esm/index.js +5 -0
  11. package/dist/esm/options-ChaXtdFn.d.ts +387 -0
  12. package/package.json +27 -25
  13. package/dist/esm/app.d.mts +0 -5
  14. package/dist/esm/app.mjs +0 -34
  15. package/dist/esm/application.d.mts +0 -17
  16. package/dist/esm/application.mjs +0 -99
  17. package/dist/esm/cli-reporter.d.ts +0 -38
  18. package/dist/esm/cli-reporter.js +0 -386
  19. package/dist/esm/commandCheck.d.ts +0 -3
  20. package/dist/esm/commandCheck.js +0 -52
  21. package/dist/esm/commandConfig.d.ts +0 -3
  22. package/dist/esm/commandConfig.js +0 -18
  23. package/dist/esm/commandDictionaries.d.ts +0 -3
  24. package/dist/esm/commandDictionaries.js +0 -40
  25. package/dist/esm/commandHelpers.d.ts +0 -18
  26. package/dist/esm/commandHelpers.js +0 -30
  27. package/dist/esm/commandInit.d.ts +0 -3
  28. package/dist/esm/commandInit.js +0 -25
  29. package/dist/esm/commandLink.d.ts +0 -3
  30. package/dist/esm/commandLink.js +0 -48
  31. package/dist/esm/commandLint.d.ts +0 -3
  32. package/dist/esm/commandLint.js +0 -226
  33. package/dist/esm/commandSuggestion.d.ts +0 -3
  34. package/dist/esm/commandSuggestion.js +0 -61
  35. package/dist/esm/commandTrace.d.ts +0 -3
  36. package/dist/esm/commandTrace.js +0 -91
  37. package/dist/esm/config/adjustConfig.d.ts +0 -7
  38. package/dist/esm/config/adjustConfig.js +0 -137
  39. package/dist/esm/config/config.d.ts +0 -5
  40. package/dist/esm/config/config.js +0 -18
  41. package/dist/esm/config/configInit.d.ts +0 -3
  42. package/dist/esm/config/configInit.js +0 -104
  43. package/dist/esm/config/constants.d.ts +0 -17
  44. package/dist/esm/config/constants.js +0 -23
  45. package/dist/esm/config/index.d.ts +0 -3
  46. package/dist/esm/config/index.js +0 -2
  47. package/dist/esm/config/options.d.ts +0 -62
  48. package/dist/esm/config/options.js +0 -2
  49. package/dist/esm/config/updateConfig.d.ts +0 -3
  50. package/dist/esm/config/updateConfig.js +0 -2
  51. package/dist/esm/console.d.ts +0 -25
  52. package/dist/esm/console.js +0 -53
  53. package/dist/esm/dictionaries/index.d.ts +0 -3
  54. package/dist/esm/dictionaries/index.js +0 -2
  55. package/dist/esm/dictionaries/listDictionaries.d.ts +0 -33
  56. package/dist/esm/dictionaries/listDictionaries.js +0 -131
  57. package/dist/esm/dirname.d.ts +0 -2
  58. package/dist/esm/dirname.js +0 -13
  59. package/dist/esm/emitters/DictionaryPathFormat.d.ts +0 -3
  60. package/dist/esm/emitters/DictionaryPathFormat.js +0 -12
  61. package/dist/esm/emitters/dictionaryListEmitter.d.ts +0 -19
  62. package/dist/esm/emitters/dictionaryListEmitter.js +0 -82
  63. package/dist/esm/emitters/helpers.d.ts +0 -14
  64. package/dist/esm/emitters/helpers.js +0 -67
  65. package/dist/esm/emitters/suggestionsEmitter.d.ts +0 -13
  66. package/dist/esm/emitters/suggestionsEmitter.js +0 -79
  67. package/dist/esm/emitters/traceEmitter.d.ts +0 -19
  68. package/dist/esm/emitters/traceEmitter.js +0 -87
  69. package/dist/esm/environment.d.ts +0 -39
  70. package/dist/esm/environment.js +0 -30
  71. package/dist/esm/featureFlags/featureFlags.d.ts +0 -4
  72. package/dist/esm/featureFlags/featureFlags.js +0 -21
  73. package/dist/esm/featureFlags/index.d.ts +0 -2
  74. package/dist/esm/featureFlags/index.js +0 -2
  75. package/dist/esm/index.d.mts +0 -6
  76. package/dist/esm/index.mjs +0 -4
  77. package/dist/esm/link.d.ts +0 -8
  78. package/dist/esm/link.js +0 -39
  79. package/dist/esm/lint/LintRequest.d.ts +0 -26
  80. package/dist/esm/lint/LintRequest.js +0 -83
  81. package/dist/esm/lint/index.d.ts +0 -3
  82. package/dist/esm/lint/index.js +0 -3
  83. package/dist/esm/lint/lint.d.ts +0 -8
  84. package/dist/esm/lint/lint.js +0 -515
  85. package/dist/esm/models.d.ts +0 -15
  86. package/dist/esm/models.js +0 -2
  87. package/dist/esm/options.d.ts +0 -353
  88. package/dist/esm/options.js +0 -9
  89. package/dist/esm/pkgInfo.d.ts +0 -14
  90. package/dist/esm/pkgInfo.js +0 -7
  91. package/dist/esm/repl/index.d.ts +0 -18
  92. package/dist/esm/repl/index.js +0 -52
  93. package/dist/esm/util/InMemoryReporter.d.ts +0 -31
  94. package/dist/esm/util/InMemoryReporter.js +0 -49
  95. package/dist/esm/util/LintFileResult.d.ts +0 -14
  96. package/dist/esm/util/LintFileResult.js +0 -2
  97. package/dist/esm/util/async.d.ts +0 -3
  98. package/dist/esm/util/async.js +0 -4
  99. package/dist/esm/util/cache/CSpellLintResultCache.d.ts +0 -20
  100. package/dist/esm/util/cache/CSpellLintResultCache.js +0 -2
  101. package/dist/esm/util/cache/CacheOptions.d.ts +0 -34
  102. package/dist/esm/util/cache/CacheOptions.js +0 -2
  103. package/dist/esm/util/cache/DiskCache.d.ts +0 -63
  104. package/dist/esm/util/cache/DiskCache.js +0 -214
  105. package/dist/esm/util/cache/DummyCache.d.ts +0 -11
  106. package/dist/esm/util/cache/DummyCache.js +0 -18
  107. package/dist/esm/util/cache/ObjectCollection.d.ts +0 -17
  108. package/dist/esm/util/cache/ObjectCollection.js +0 -127
  109. package/dist/esm/util/cache/createCache.d.ts +0 -31
  110. package/dist/esm/util/cache/createCache.js +0 -69
  111. package/dist/esm/util/cache/file-entry-cache.d.mts +0 -4
  112. package/dist/esm/util/cache/file-entry-cache.mjs +0 -5
  113. package/dist/esm/util/cache/fileEntryCache.d.ts +0 -9
  114. package/dist/esm/util/cache/fileEntryCache.js +0 -79
  115. package/dist/esm/util/cache/index.d.ts +0 -4
  116. package/dist/esm/util/cache/index.js +0 -2
  117. package/dist/esm/util/canUseColor.d.ts +0 -2
  118. package/dist/esm/util/canUseColor.js +0 -10
  119. package/dist/esm/util/configFileHelper.d.ts +0 -15
  120. package/dist/esm/util/configFileHelper.js +0 -43
  121. package/dist/esm/util/constants.d.ts +0 -6
  122. package/dist/esm/util/constants.js +0 -6
  123. package/dist/esm/util/errors.d.ts +0 -24
  124. package/dist/esm/util/errors.js +0 -60
  125. package/dist/esm/util/extractContext.d.ts +0 -5
  126. package/dist/esm/util/extractContext.js +0 -75
  127. package/dist/esm/util/fileHelper.d.ts +0 -44
  128. package/dist/esm/util/fileHelper.js +0 -165
  129. package/dist/esm/util/glob.d.ts +0 -45
  130. package/dist/esm/util/glob.js +0 -147
  131. package/dist/esm/util/pad.d.ts +0 -45
  132. package/dist/esm/util/pad.js +0 -191
  133. package/dist/esm/util/prefetch.d.ts +0 -2
  134. package/dist/esm/util/prefetch.js +0 -15
  135. package/dist/esm/util/reporters.d.ts +0 -30
  136. package/dist/esm/util/reporters.js +0 -209
  137. package/dist/esm/util/stdin.d.ts +0 -2
  138. package/dist/esm/util/stdin.js +0 -5
  139. package/dist/esm/util/stdinUrl.d.ts +0 -9
  140. package/dist/esm/util/stdinUrl.js +0 -26
  141. package/dist/esm/util/table.d.ts +0 -41
  142. package/dist/esm/util/table.js +0 -115
  143. package/dist/esm/util/timer.d.ts +0 -4
  144. package/dist/esm/util/timer.js +0 -9
  145. package/dist/esm/util/types.d.ts +0 -7
  146. package/dist/esm/util/types.js +0 -5
  147. package/dist/esm/util/unindent.d.ts +0 -14
  148. package/dist/esm/util/unindent.js +0 -55
  149. package/dist/esm/util/util.d.ts +0 -14
  150. package/dist/esm/util/util.js +0 -30
  151. package/dist/esm/util/writeFile.d.ts +0 -3
  152. package/dist/esm/util/writeFile.js +0 -30
@@ -1,353 +0,0 @@
1
- import { CSpellSettings, ReporterConfiguration } from '@cspell/cspell-types';
2
- import type { CacheOptions } from './util/cache/index.js';
3
- export interface LinterOptions extends Omit<BaseOptions, 'config'>, Omit<CacheOptions, 'version'>, ReporterConfiguration {
4
- /**
5
- * Display verbose information
6
- */
7
- verbose?: boolean;
8
- /**
9
- * Show extensive output.
10
- */
11
- debug?: boolean;
12
- /**
13
- * a globs to exclude files from being checked.
14
- */
15
- exclude?: string[] | string;
16
- /**
17
- * Only report the words, no line numbers or file names.
18
- */
19
- wordsOnly?: boolean;
20
- /**
21
- * unique errors per file only.
22
- */
23
- unique?: boolean;
24
- /**
25
- * root directory, defaults to `cwd`
26
- */
27
- root?: string;
28
- /**
29
- * Determine if files / directories starting with `.` should be part
30
- * of the glob search.
31
- * @default false
32
- */
33
- dot?: boolean;
34
- /**
35
- * Show part of a line where an issue is found.
36
- * - if true, it will show the default number of characters on either side.
37
- * - if a number, the number of characters to show on either side of the issue.
38
- */
39
- showContext?: boolean | number;
40
- /**
41
- * Show suggestions for spelling errors.
42
- */
43
- showSuggestions?: boolean;
44
- /**
45
- * Enable filtering out files matching globs found in `.gitignore` files.
46
- */
47
- gitignore?: boolean;
48
- /**
49
- * Stop searching for a `.gitignore`s when a root is reached.
50
- */
51
- gitignoreRoot?: string | string[];
52
- /**
53
- * List of files that contains the paths to files to be spell checked.
54
- * The files in the lists will be filtered against the glob patterns.
55
- * - an entry of `stdin` means to read the file list from **`stdin`**
56
- * The resulting files are filtered against the `files` globs found in the configuration.
57
- */
58
- fileList?: string[] | undefined;
59
- /**
60
- * List of file paths to spell check. These can be relative or absolute
61
- * paths, but not Globs. Relative paths are relative to {@link LinterOptions.root}.
62
- * The files are combined with the file paths read from {@link LinterOptions.fileList}.
63
- * These files are filtered against the `files` globs found in the configuration.
64
- */
65
- files?: string[] | undefined;
66
- /**
67
- * Alias of {@link LinterOptions.files}.
68
- */
69
- file?: string[] | undefined;
70
- /**
71
- * Use the `files` configuration to filter the files found.
72
- */
73
- filterFiles?: boolean | undefined;
74
- /**
75
- * Files must be found and processed otherwise it is considered an error.
76
- */
77
- mustFindFiles?: boolean;
78
- /**
79
- * List of dictionary names to use.
80
- */
81
- dictionary?: string[] | undefined;
82
- /**
83
- * List of dictionary names to disable.
84
- */
85
- disableDictionary?: string[] | undefined;
86
- /**
87
- * Stop processing and exit if an issue or error is found.
88
- */
89
- failFast?: boolean;
90
- /**
91
- * Keep going even if an error is found.
92
- */
93
- continueOnError?: boolean;
94
- /**
95
- * Optional list of reporters to use, overriding any specified in the
96
- * configuration.
97
- */
98
- reporter?: string[];
99
- /**
100
- * Load and parse documents, but do not spell check.
101
- */
102
- skipValidation?: boolean;
103
- /**
104
- * Path to configuration file.
105
- */
106
- config?: string | CSpellConfigFile;
107
- }
108
- export interface TraceOptions extends BaseOptions {
109
- /**
110
- * Use stdin for the input.
111
- */
112
- stdin?: boolean;
113
- /**
114
- * Enable the `allowCompoundWords` option.
115
- */
116
- allowCompoundWords?: boolean;
117
- /**
118
- * Ignore case and accents when searching for words.
119
- */
120
- ignoreCase?: boolean;
121
- /**
122
- * Show all dictionaries, not just the ones that contain the words or are enabled.
123
- */
124
- all?: boolean;
125
- /**
126
- * Show only dictionaries that contain the words.
127
- * If `all` is set, this option is ignored.
128
- */
129
- onlyFound?: boolean;
130
- /**
131
- * Names of dictionaries to use.
132
- */
133
- dictionary?: string[] | undefined;
134
- /**
135
- * Configure how to display the dictionary path.
136
- */
137
- dictionaryPath?: 'hide' | 'long' | 'short' | 'full';
138
- }
139
- export interface SuggestionOptions extends BaseOptions {
140
- /**
141
- * Strict case and accent checking
142
- * @default true
143
- */
144
- strict?: boolean;
145
- /**
146
- * List of dictionaries to use. If specified, only that list of dictionaries will be used.
147
- */
148
- dictionaries?: string[] | undefined;
149
- /**
150
- * The number of suggestions to make.
151
- * @default 8
152
- */
153
- numSuggestions?: number;
154
- /**
155
- * Max number of changes / edits to the word to get to a suggestion matching suggestion.
156
- * @default 4
157
- */
158
- numChanges?: number;
159
- /**
160
- * If multiple suggestions have the same edit / change "cost", then included them even if
161
- * it causes more than `numSuggestions` to be returned.
162
- * @default true
163
- */
164
- includeTies?: boolean;
165
- /**
166
- * Use stdin for the input
167
- */
168
- useStdin?: boolean | undefined;
169
- /**
170
- * Use REPL interface for making suggestions.
171
- */
172
- repl?: boolean;
173
- }
174
- export interface DictionariesOptions {
175
- /**
176
- * Path to configuration file.
177
- */
178
- config?: string;
179
- /**
180
- * Load the default configuration
181
- * @default true
182
- */
183
- defaultConfiguration?: boolean;
184
- /**
185
- * Use color in the output.
186
- * `true` to force color, `false` to turn off color.
187
- * `undefined` to use color if the output is a TTY.
188
- */
189
- color?: boolean | undefined;
190
- /**
191
- * Show enabled:
192
- * - `true` to show only enabled dictionaries.
193
- * - `false` to show only disabled dictionaries.
194
- * - `undefined` to show all dictionaries.
195
- */
196
- enabled?: boolean | undefined;
197
- /**
198
- * The locale to use when listing dictionaries.
199
- */
200
- locale?: string;
201
- /**
202
- * The file type to use when listing dictionaries.
203
- */
204
- fileType?: string;
205
- /**
206
- * show the language locales supported by the dictionary.
207
- */
208
- showLocales?: boolean;
209
- /**
210
- * show the file types supported by the dictionary.
211
- */
212
- showFileTypes?: boolean;
213
- /**
214
- * Dhow the location of the dictionary.
215
- */
216
- showLocation?: boolean;
217
- pathFormat?: 'hide' | 'short' | 'long' | 'full';
218
- }
219
- export interface LegacyOptions {
220
- local?: string;
221
- }
222
- export type LegacyFixes = Pick<BaseOptions, 'locale'>;
223
- export interface BaseOptions {
224
- /**
225
- * Path to configuration file.
226
- */
227
- config?: string;
228
- /**
229
- * Programming Language ID.
230
- */
231
- languageId?: string;
232
- /**
233
- * Locale to use.
234
- */
235
- locale?: string;
236
- /**
237
- * Load the default configuration
238
- * @default true
239
- */
240
- defaultConfiguration?: boolean;
241
- /**
242
- * Check In-Document CSpell directives for correctness.
243
- */
244
- validateDirectives?: boolean;
245
- /**
246
- * Return an exit code if there are issues found.
247
- * @default true
248
- */
249
- exitCode?: boolean;
250
- /**
251
- * Execution flags.
252
- * Used primarily for releasing experimental features.
253
- * Flags are of the form key:value
254
- */
255
- flag?: string[];
256
- /**
257
- * Use color in the output.
258
- * `true` to force color, `false` to turn off color.
259
- * `undefined` to use color if the output is a TTY.
260
- */
261
- color?: boolean | undefined;
262
- }
263
- export interface LinterCliOptions extends LinterOptions {
264
- /**
265
- * Show legacy output
266
- */
267
- legacy?: boolean;
268
- /**
269
- * Show summary at the end
270
- */
271
- summary?: boolean;
272
- /**
273
- * Show issues
274
- */
275
- issues?: boolean;
276
- /**
277
- * Run in silent mode.
278
- * @default false
279
- */
280
- silent?: boolean;
281
- /**
282
- * Show progress
283
- */
284
- progress?: boolean;
285
- /**
286
- * issues are shown with a relative path to the root or `cwd`
287
- */
288
- relative?: boolean;
289
- /**
290
- * Files must be found or cli will exit with an error.
291
- */
292
- mustFindFiles?: boolean;
293
- /**
294
- * Generate a summary report of issues.
295
- */
296
- issuesSummaryReport?: boolean;
297
- /**
298
- * Generate a summary report of performance.
299
- */
300
- showPerfSummary?: boolean;
301
- /**
302
- * Set the template to use when reporting issues.
303
- *
304
- * The template is a string that can contain the following placeholders:
305
- * - `$filename` - the file name
306
- * - `$col` - the column number
307
- * - `$row` - the row number
308
- * - `$text` - the word that is misspelled
309
- * - `$message` - the issues message: "unknown word", "word is misspelled", etc.
310
- * - `$messageColored` - the issues message with color based upon the message type.
311
- * - `$uri` - the URI of the file
312
- * - `$suggestions` - suggestions for the misspelled word (if requested)
313
- * - `$quickFix` - possible quick fixes for the misspelled word.
314
- * - `$contextFull` - the full context of the misspelled word.
315
- * - `$contextLeft` - the context to the left of the misspelled word.
316
- * - `$contextRight` - the context to the right of the misspelled word.
317
- *
318
- * Color is supported using the following template pattern:
319
- * - `{<style[.style]> <text>}` - where `<style>` is a style name and `<text>` is the text to style.
320
- *
321
- * Styles
322
- * - `bold`, `italic`, `underline`, `strikethrough`, `dim`, `inverse`
323
- * - `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`
324
- *
325
- * Example:
326
- * @example "{green $filename}:{yellow $row}:{yellow $col} $message {red $text} $quickFix {dim $suggestions}"
327
- * @since 8.12.0
328
- */
329
- issueTemplate?: string;
330
- /**
331
- * Prevents searching for local configuration files
332
- *
333
- * When `--no-config-search` is passed on the command line, this will be `true`.
334
- * If the flag is not passed, it defaults to `false`.
335
- */
336
- configSearch?: boolean;
337
- /**
338
- * Directory paths at which CSpell should stop searching for configuration files.
339
- *
340
- * These are set via one or more `--stop-config-search-at <dir>` CLI options.
341
- * If no flags are passed, this will be `undefined`.
342
- */
343
- stopConfigSearchAt?: string[];
344
- report?: ReportChoices | undefined;
345
- }
346
- export type ReportChoices = 'all' | 'simple' | 'typos' | 'flagged';
347
- export declare const ReportChoicesAll: readonly ReportChoices[];
348
- export declare function fixLegacy<T extends LegacyFixes>(opts: T & LegacyOptions): Omit<T & LegacyOptions, 'local'>;
349
- export interface CSpellConfigFile {
350
- url: URL;
351
- settings: CSpellSettings;
352
- }
353
- //# sourceMappingURL=options.d.ts.map
@@ -1,9 +0,0 @@
1
- export const ReportChoicesAll = ['all', 'simple', 'typos', 'flagged'];
2
- export function fixLegacy(opts) {
3
- const { local, ...rest } = opts;
4
- if (local && !rest.locale) {
5
- rest.locale = local;
6
- }
7
- return rest;
8
- }
9
- //# sourceMappingURL=options.js.map
@@ -1,14 +0,0 @@
1
- export { pkgDir } from './dirname.js';
2
- export declare const name = "cspell";
3
- export declare const version = "9.1.2";
4
- export declare const engines: {
5
- node: string;
6
- };
7
- export declare const npmPackage: {
8
- name: string;
9
- version: string;
10
- engines: {
11
- node: string;
12
- };
13
- };
14
- //# sourceMappingURL=pkgInfo.d.ts.map
@@ -1,7 +0,0 @@
1
- // This file is generated by tools/patch-version.mjs
2
- export { pkgDir } from './dirname.js';
3
- export const name = 'cspell';
4
- export const version = '9.1.2';
5
- export const engines = { node: '>=20' };
6
- export const npmPackage = { name, version, engines };
7
- //# sourceMappingURL=pkgInfo.js.map
@@ -1,18 +0,0 @@
1
- export declare function simpleRepl(): AsyncIterable<string>;
2
- export type CompleterResult = [string[], string];
3
- export type Completer = (line: string) => CompleterResult;
4
- export declare class SimpleRepl implements AsyncIterable<string> {
5
- prompt: string;
6
- beforeEach: undefined | (() => void);
7
- completer: undefined | Completer;
8
- private _history;
9
- private rl;
10
- constructor(prompt?: string);
11
- question(query: string): Promise<string>;
12
- private _completer;
13
- get history(): string[];
14
- [Symbol.asyncIterator](): {
15
- next: () => Promise<IteratorResult<string, undefined>>;
16
- };
17
- }
18
- //# sourceMappingURL=index.d.ts.map
@@ -1,52 +0,0 @@
1
- import * as readline from 'node:readline';
2
- export function simpleRepl() {
3
- return new SimpleRepl();
4
- }
5
- export class SimpleRepl {
6
- prompt;
7
- beforeEach;
8
- completer;
9
- _history;
10
- rl;
11
- constructor(prompt = '> ') {
12
- this.prompt = prompt;
13
- this._history = [];
14
- this.rl = readline.createInterface({
15
- input: process.stdin,
16
- output: process.stdout,
17
- prompt,
18
- history: this._history,
19
- historySize: 100,
20
- completer: (line) => this._completer(line),
21
- });
22
- this.rl.on('history', (h) => ((this._history = h), undefined));
23
- }
24
- question(query) {
25
- return new Promise((resolve) => {
26
- this.rl.question(query, resolve);
27
- });
28
- }
29
- _completer(line) {
30
- // console.log('Complete: %s', line);
31
- // console.log('History: %o', this._history);
32
- if (this.completer)
33
- return this.completer(line);
34
- const hist = this._history.filter((h) => h.startsWith(line));
35
- return [hist, line];
36
- }
37
- get history() {
38
- return this._history;
39
- }
40
- [Symbol.asyncIterator]() {
41
- const next = () => {
42
- if (this.beforeEach)
43
- this.beforeEach();
44
- // console.log('%o', this.rl);
45
- return this.question(this.prompt)
46
- .then((value) => ({ value }))
47
- .catch(() => ({ done: true, value: undefined }));
48
- };
49
- return { next };
50
- }
51
- }
52
- //# sourceMappingURL=index.js.map
@@ -1,31 +0,0 @@
1
- import type { CSpellReporter, Issue, ProgressItem, RunResult } from '@cspell/cspell-types';
2
- export interface InMemoryResult {
3
- log: string[];
4
- issues: Issue[];
5
- runResult: RunResult | undefined;
6
- }
7
- /**
8
- * Simple reporter for test purposes
9
- */
10
- export declare class InMemoryReporter implements CSpellReporter, InMemoryResult {
11
- log: string[];
12
- errors: Error[];
13
- issueCount: number;
14
- errorCount: number;
15
- debugCount: number;
16
- infoCount: number;
17
- progressCount: number;
18
- issues: Issue[];
19
- runResult: RunResult | undefined;
20
- issue(issue: Issue): void;
21
- error(message: string, error: Error): void;
22
- info(message: string): void;
23
- debug(message: string): void;
24
- progress(p: ProgressItem): void;
25
- result(r: RunResult): void;
26
- dump(): InMemoryResult;
27
- get features(): {
28
- issueType: boolean;
29
- };
30
- }
31
- //# sourceMappingURL=InMemoryReporter.d.ts.map
@@ -1,49 +0,0 @@
1
- /**
2
- * Simple reporter for test purposes
3
- */
4
- export class InMemoryReporter {
5
- log = [];
6
- errors = [];
7
- issueCount = 0;
8
- errorCount = 0;
9
- debugCount = 0;
10
- infoCount = 0;
11
- progressCount = 0;
12
- issues = [];
13
- runResult;
14
- issue(issue) {
15
- this.issues.push(issue);
16
- this.issueCount += 1;
17
- const { uri, row, col, text } = issue;
18
- this.log.push(`Issue: ${uri}[${row}, ${col}]: Unknown word: ${text}`);
19
- }
20
- error(message, error) {
21
- this.errorCount += 1;
22
- this.errors.push(error);
23
- this.log.push(`Error: ${message} ${error.toString()}`);
24
- }
25
- info(message) {
26
- this.infoCount += 1;
27
- this.log.push(`Info: ${message}`);
28
- }
29
- debug(message) {
30
- this.debugCount += 1;
31
- this.log.push(`Debug: ${message}`);
32
- }
33
- progress(p) {
34
- this.progressCount += 1;
35
- this.log.push(`Progress: ${p.type} ${p.fileNum} ${p.fileCount} ${p.filename}`);
36
- }
37
- result(r) {
38
- this.runResult = r;
39
- }
40
- dump() {
41
- return { log: this.log, issues: this.issues, runResult: this.runResult };
42
- }
43
- get features() {
44
- return {
45
- issueType: true,
46
- };
47
- }
48
- }
49
- //# sourceMappingURL=InMemoryReporter.js.map
@@ -1,14 +0,0 @@
1
- import { Issue, ReportIssueOptions } from '@cspell/cspell-types';
2
- import { FileInfo, Perf } from './fileHelper.js';
3
- export interface LintFileResult {
4
- fileInfo: FileInfo;
5
- processed: boolean;
6
- issues: Issue[];
7
- errors: number;
8
- configErrors: number;
9
- elapsedTimeMs: number | undefined;
10
- perf?: Perf | undefined;
11
- cached?: boolean;
12
- reportIssueOptions?: ReportIssueOptions | undefined;
13
- }
14
- //# sourceMappingURL=LintFileResult.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=LintFileResult.js.map
@@ -1,3 +0,0 @@
1
- export { helpers as asyncHelpers, toArray as asyncIterableToArray, operators as asyncOperators, pipeAsync as asyncPipe, toAsyncIterable as mergeAsyncIterables, } from '@cspell/cspell-pipe';
2
- export declare const asyncMap: typeof import("@cspell/cspell-pipe/operators").opMapAsync, asyncFilter: typeof import("@cspell/cspell-pipe/operators").opFilterAsync, asyncAwait: typeof import("@cspell/cspell-pipe").opAwaitAsync, asyncFlatten: typeof import("@cspell/cspell-pipe/operators").opFlattenAsync;
3
- //# sourceMappingURL=async.d.ts.map
@@ -1,4 +0,0 @@
1
- import { operators } from '@cspell/cspell-pipe';
2
- export { helpers as asyncHelpers, toArray as asyncIterableToArray, operators as asyncOperators, pipeAsync as asyncPipe, toAsyncIterable as mergeAsyncIterables, } from '@cspell/cspell-pipe';
3
- export const { opMapAsync: asyncMap, opFilterAsync: asyncFilter, opAwaitAsync: asyncAwait, opFlattenAsync: asyncFlatten, } = operators;
4
- //# sourceMappingURL=async.js.map
@@ -1,20 +0,0 @@
1
- import type { LintFileResult } from '../LintFileResult.js';
2
- export interface CSpellLintResultCache {
3
- /**
4
- * Retrieve cached lint results for a given file name, if present in the cache.
5
- */
6
- getCachedLintResults(filename: string): Promise<LintFileResult | undefined>;
7
- /**
8
- * Set the cached lint results.
9
- */
10
- setCachedLintResults(result: LintFileResult, dependsUponFiles: string[]): void;
11
- /**
12
- * Persists the in-memory cache to disk.
13
- */
14
- reconcile(): void;
15
- /**
16
- * Resets the cache.
17
- */
18
- reset(): void;
19
- }
20
- //# sourceMappingURL=CSpellLintResultCache.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=CSpellLintResultCache.js.map
@@ -1,34 +0,0 @@
1
- import type { CacheFormat, CacheStrategy } from '@cspell/cspell-types';
2
- export interface CacheOptions {
3
- /**
4
- * The version of `cspell` that made the cache entry.
5
- * Cache entries must match the `major.minor` version.
6
- */
7
- version: string;
8
- /**
9
- * Store the info about processed files in order to only operate on the changed ones.
10
- */
11
- cache?: boolean;
12
- /**
13
- * Path to the cache location. Can be a file or a directory.
14
- * If none specified .cspellcache will be used.
15
- * The file will be created in the directory where the cspell command is executed.
16
- */
17
- cacheLocation?: string;
18
- /**
19
- * Strategy to use for detecting changed files, default: metadata
20
- */
21
- cacheStrategy?: CacheStrategy;
22
- /**
23
- * Resets the cache
24
- */
25
- cacheReset?: boolean;
26
- /**
27
- * Format of the cache file.
28
- * - `legacy` - use absolute paths in the cache file
29
- * - `universal` - use a sharable format.
30
- * @default 'legacy'
31
- */
32
- cacheFormat?: CacheFormat;
33
- }
34
- //# sourceMappingURL=CacheOptions.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=CacheOptions.js.map