cspell 10.0.1 → 10.1.1
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/README.md +4 -4
- package/dist/esm/app.d.ts +1 -2
- package/dist/esm/app.js +12 -8
- package/dist/esm/{application-Ck3Auwvx.js → application-BcBLKy3U.js} +26 -20
- package/dist/esm/{application-BXlOXgoM.d.ts → application-BeYqH0KN.d.ts} +54 -55
- package/dist/esm/application.d.ts +1 -1
- package/dist/esm/application.js +1 -1
- package/dist/esm/index.d.ts +6 -6
- package/dist/esm/index.js +1 -1
- package/dist/esm/options-CG62AIq-.d.ts +403 -0
- package/package.json +26 -22
- package/dist/esm/options-CShRqKvy.d.ts +0 -401
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ A Spell Checker for Code!
|
|
|
25
25
|
## Features
|
|
26
26
|
|
|
27
27
|
- Spell Checks Code -- Able to spell check code by parsing it into words before checking against the dictionaries.
|
|
28
|
-
- Supports CamelCase,
|
|
28
|
+
- Supports CamelCase, snake\_case, and compoundwords naming styles.
|
|
29
29
|
- Self contained -- does not depend upon OS libraries like Hunspell or aspell. Nor does it depend upon online services.
|
|
30
30
|
- Fast -- checks 1000's of lines of code in seconds.
|
|
31
31
|
- Programming Language Specific Dictionaries -- Has dedicated support for:
|
|
@@ -341,11 +341,11 @@ exec git diff --cached --name-only | npx cspell --no-summary --no-progress --no-
|
|
|
341
341
|
|
|
342
342
|
## Requirements
|
|
343
343
|
|
|
344
|
-
CSpell needs Node
|
|
344
|
+
CSpell needs Node 22 and above.
|
|
345
345
|
|
|
346
346
|
## How it works
|
|
347
347
|
|
|
348
|
-
The concept is simple, split camelCase and
|
|
348
|
+
The concept is simple, split camelCase and snake\_case words before checking them against a list of known words.
|
|
349
349
|
|
|
350
350
|
- `camelCase` -> `camel case`
|
|
351
351
|
- `HTMLInput` -> `html input`
|
|
@@ -681,7 +681,7 @@ The spell checker includes a set of default dictionaries.
|
|
|
681
681
|
|
|
682
682
|
### General Dictionaries
|
|
683
683
|
|
|
684
|
-
- **
|
|
684
|
+
- **en\_US** - Derived from Hunspell US English words.
|
|
685
685
|
- **en-gb** - Derived from Hunspell GB English words.
|
|
686
686
|
- **companies** - List of well known companies
|
|
687
687
|
- **softwareTerms** - Software Terms and concepts like "coroutine", "debounce", "tree", etc.
|
package/dist/esm/app.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { i as LinterCliOptions } from "./options-
|
|
1
|
+
import { i as LinterCliOptions } from "./options-CG62AIq-.js";
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
|
|
4
3
|
//#region src/util/errors.d.ts
|
|
5
4
|
declare class CheckFailed extends Error {
|
|
6
5
|
readonly exitCode: number;
|
package/dist/esm/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ApplicationError, S as width, T as console, _ as padLeft, a as parseApplicationFeatureFlags, b as pruneAnsiTextEnd, c as listDictionaries, d as validateUnitSize, f as unindent, g as tableToLines, i as lint, l as ReportChoicesAll, m as npmPackage, n as checkText, o as suggestions, p as DEFAULT_CACHE_LOCATION, r as createInit, s as trace, t as IncludeExcludeFlag, u as cvtLinterCliCommandOptionsToLinterCliOptions, v as padWidth, w as CheckFailed, x as pruneAnsiTextStart, y as ansiWidth } from "./application-
|
|
1
|
+
import { C as ApplicationError, S as width, T as console, _ as padLeft, a as parseApplicationFeatureFlags, b as pruneAnsiTextEnd, c as listDictionaries, d as validateUnitSize, f as unindent, g as tableToLines, i as lint, l as ReportChoicesAll, m as npmPackage, n as checkText, o as suggestions, p as DEFAULT_CACHE_LOCATION, r as createInit, s as trace, t as IncludeExcludeFlag, u as cvtLinterCliCommandOptionsToLinterCliOptions, v as padWidth, w as CheckFailed, x as pruneAnsiTextStart, y as ansiWidth } from "./application-BcBLKy3U.js";
|
|
2
2
|
import { Link } from "cspell-lib";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import * as iPath from "node:path";
|
|
@@ -135,10 +135,12 @@ function calcListDictsResultsReport(results, options) {
|
|
|
135
135
|
else if (options.color === false) chalk.level = 0;
|
|
136
136
|
const col = new Intl.Collator();
|
|
137
137
|
results.sort((a, b) => col.compare(a.name, b.name));
|
|
138
|
+
const header = calcHeaders(options);
|
|
139
|
+
const rows = results.map((r) => dictTableRowToTableRow(emitDictResult(r, options)));
|
|
138
140
|
return {
|
|
139
141
|
table: tableToLines({
|
|
140
|
-
header
|
|
141
|
-
rows
|
|
142
|
+
header,
|
|
143
|
+
rows,
|
|
142
144
|
terminalWidth: options.lineWidth || process.stdout.columns || maxWidth$1,
|
|
143
145
|
deliminator: " ",
|
|
144
146
|
maxColumnWidths: {
|
|
@@ -285,7 +287,8 @@ function addPathsToGlobalImportsResultToTable(results) {
|
|
|
285
287
|
function commandLink(prog) {
|
|
286
288
|
const linkCommand = prog.command("link").description("Link dictionaries and other settings to the cspell global config.");
|
|
287
289
|
linkCommand.command("list", { isDefault: true }).alias("ls").description("List currently linked configurations.").action(async () => {
|
|
288
|
-
|
|
290
|
+
const table = listGlobalImportsResultToTable((await listGlobalImports()).list);
|
|
291
|
+
tableToLines(table).forEach((line) => console.log(line));
|
|
289
292
|
});
|
|
290
293
|
linkCommand.command("add <dictionaries...>").alias("a").description("Add dictionaries any other settings to the cspell global config.").action(async (dictionaries) => {
|
|
291
294
|
const r = await addPathsToGlobalImports(dictionaries);
|
|
@@ -537,7 +540,6 @@ function mergeArrays(a, b) {
|
|
|
537
540
|
//#endregion
|
|
538
541
|
//#region src/emitters/traceEmitter.ts
|
|
539
542
|
const maxWidth = 120;
|
|
540
|
-
const colWidthDictionaryName = 20;
|
|
541
543
|
function emitTraceResults(word, found, results, options) {
|
|
542
544
|
const report = calcTraceResultsReport(word, found, results, options);
|
|
543
545
|
console.log(report.table);
|
|
@@ -552,10 +554,12 @@ function calcTraceResultsReport(word, found, results, options) {
|
|
|
552
554
|
const col = new Intl.Collator();
|
|
553
555
|
results.sort((a, b) => col.compare(a.dictName, b.dictName));
|
|
554
556
|
options.showWordFound && console.log(`${options.prefix || ""}${word}: ${found ? "Found" : "Not Found"}`);
|
|
557
|
+
const header = emitHeader(options.dictionaryPathFormat !== "hide");
|
|
558
|
+
const rows = results.map((r) => emitTraceResult(r, options));
|
|
555
559
|
return {
|
|
556
560
|
table: tableToLines({
|
|
557
|
-
header
|
|
558
|
-
rows
|
|
561
|
+
header,
|
|
562
|
+
rows,
|
|
559
563
|
terminalWidth: options.lineWidth || process.stdout.columns || maxWidth,
|
|
560
564
|
deliminator: " "
|
|
561
565
|
}).map((line) => line.trimEnd()).join("\n"),
|
|
@@ -578,7 +582,7 @@ function emitTraceResult(r, options) {
|
|
|
578
582
|
const w = (r.forbidden ? chalk.red(cWord) : chalk.green(cWord)) + (sug ? `->(${sug})` : "");
|
|
579
583
|
const f = calcFoundChar(r);
|
|
580
584
|
const a = (r.dictBlocked ? chalk.redBright("!") : "") + (r.dictActive ? "*" : " ");
|
|
581
|
-
const dictName = r.dictName.slice(0,
|
|
585
|
+
const dictName = r.dictName.slice(0, 19) + a;
|
|
582
586
|
const n = (r.dictActive ? chalk.yellowBright : chalk.rgb(200, 128, 50))(dictName);
|
|
583
587
|
const c = colorize(errors ? chalk.red : chalk.white);
|
|
584
588
|
return [
|
|
@@ -629,7 +629,8 @@ function getReporter(options, config) {
|
|
|
629
629
|
const cachedFilesText = cachedFiles ? ` (${cachedFiles} from cache)` : "";
|
|
630
630
|
const skippedFilesText = skippedFiles ? `, skipped: ${skippedFiles}` : "";
|
|
631
631
|
const withErrorsText = errors ? ` with ${errors} error${errors === 1 ? "" : "s"}` : "";
|
|
632
|
-
|
|
632
|
+
const summaryMessage = `CSpell\u003A Files checked: ${filesChecked}${cachedFilesText}${skippedFilesText}, Issues found: ${issues} in ${numFilesWithIssues === 1 ? "1 file" : `${numFilesWithIssues} files`}${withErrorsText}.`;
|
|
633
|
+
consoleError(summaryMessage);
|
|
633
634
|
if (errorCollection?.length && issues > 5) {
|
|
634
635
|
consoleError("-------------------------------------------");
|
|
635
636
|
consoleError("Errors:");
|
|
@@ -841,7 +842,8 @@ function assertCheckTemplate(template) {
|
|
|
841
842
|
if (r instanceof Error) throw r;
|
|
842
843
|
}
|
|
843
844
|
function checkTemplate(template) {
|
|
844
|
-
const
|
|
845
|
+
const chalk = new Chalk();
|
|
846
|
+
const chalkTemplate = makeTemplate(chalk);
|
|
845
847
|
const substitutions = {
|
|
846
848
|
$col: "<col>",
|
|
847
849
|
$contextFull: "<contextFull>",
|
|
@@ -1188,7 +1190,7 @@ try {
|
|
|
1188
1190
|
const pkgDir = _dirname;
|
|
1189
1191
|
const npmPackage = {
|
|
1190
1192
|
name: "cspell",
|
|
1191
|
-
version: "10.
|
|
1193
|
+
version: "10.1.1",
|
|
1192
1194
|
engines: { node: ">=22.18.0" }
|
|
1193
1195
|
};
|
|
1194
1196
|
//#endregion
|
|
@@ -1389,9 +1391,7 @@ function replayReportItems(reportItemsCollection, reporter) {
|
|
|
1389
1391
|
case "debug":
|
|
1390
1392
|
reporter.debug(...item.payload);
|
|
1391
1393
|
break;
|
|
1392
|
-
case "error":
|
|
1393
|
-
reporter.error(...item.payload);
|
|
1394
|
-
break;
|
|
1394
|
+
case "error": reporter.error(...item.payload);
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
//#endregion
|
|
@@ -1469,12 +1469,13 @@ function calcExcludeGlobInfo(root, commandLineExclude) {
|
|
|
1469
1469
|
* @param root - directory to use as the root
|
|
1470
1470
|
*/
|
|
1471
1471
|
function buildGlobMatcher(globs, root, isExclude) {
|
|
1472
|
-
|
|
1472
|
+
const withRoots = globs.map((g) => {
|
|
1473
1473
|
return {
|
|
1474
1474
|
source: typeof g === "string" ? "command line" : void 0,
|
|
1475
1475
|
...fileOrGlobToGlob(g, root)
|
|
1476
1476
|
};
|
|
1477
|
-
})
|
|
1477
|
+
});
|
|
1478
|
+
return new GlobMatcher(withRoots, {
|
|
1478
1479
|
root,
|
|
1479
1480
|
mode: isExclude ? "exclude" : "include"
|
|
1480
1481
|
});
|
|
@@ -1647,11 +1648,14 @@ const resolveFilenames = asyncMap(resolveFilename);
|
|
|
1647
1648
|
*/
|
|
1648
1649
|
function readFileListFiles(listFiles) {
|
|
1649
1650
|
let useStdin = false;
|
|
1650
|
-
|
|
1651
|
+
const files = listFiles.filter((file) => {
|
|
1651
1652
|
const isStdin = file === "stdin";
|
|
1652
1653
|
useStdin = useStdin || isStdin;
|
|
1653
1654
|
return !isStdin;
|
|
1654
|
-
})
|
|
1655
|
+
});
|
|
1656
|
+
const found = asyncPipe(files, asyncMap((file) => readFileListFile(file)), asyncAwait(), asyncFlatten());
|
|
1657
|
+
const stdin = useStdin ? readStdin() : [];
|
|
1658
|
+
return asyncPipe(mergeAsyncIterables(found, stdin), resolveFilenames);
|
|
1655
1659
|
}
|
|
1656
1660
|
/**
|
|
1657
1661
|
* Read a `listFile` and return the containing file paths resolved relative to the `listFile`.
|
|
@@ -2487,12 +2491,13 @@ async function processFile(file, cache, prefetch, processFileOptions) {
|
|
|
2487
2491
|
let spellResult = {};
|
|
2488
2492
|
try {
|
|
2489
2493
|
const { showSuggestions: generateSuggestions, validateDirectives, skipValidation } = cfg.options;
|
|
2490
|
-
const
|
|
2494
|
+
const validateOptions = clean({
|
|
2491
2495
|
generateSuggestions,
|
|
2492
2496
|
numSuggestions: configInfo.config.numSuggestions ?? 5,
|
|
2493
2497
|
validateDirectives,
|
|
2494
2498
|
skipValidation
|
|
2495
|
-
})
|
|
2499
|
+
});
|
|
2500
|
+
const r = await spellCheckDocument(doc, validateOptions, userSettings);
|
|
2496
2501
|
spellResult = r;
|
|
2497
2502
|
result.processed = r.checked;
|
|
2498
2503
|
result.perf = r.perf ? { ...r.perf } : void 0;
|
|
@@ -2794,7 +2799,7 @@ function runResult(init = {}) {
|
|
|
2794
2799
|
};
|
|
2795
2800
|
}
|
|
2796
2801
|
//#endregion
|
|
2797
|
-
//#region \0@oxc-project+runtime@0.
|
|
2802
|
+
//#region \0@oxc-project+runtime@0.146.0/helpers/esm/usingCtx.js
|
|
2798
2803
|
function _usingCtx() {
|
|
2799
2804
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
2800
2805
|
var n = Error();
|
|
@@ -3080,7 +3085,8 @@ async function generateGitIgnore(roots) {
|
|
|
3080
3085
|
return new GitIgnore(root?.map((p) => path$1.resolve(p)));
|
|
3081
3086
|
}
|
|
3082
3087
|
async function useFileLists(fileListFiles, filterFiles) {
|
|
3083
|
-
|
|
3088
|
+
const files = readFileListFiles(fileListFiles);
|
|
3089
|
+
return pipeAsync(files, opFilter(filterFiles), opFilterAsync(isNotDir));
|
|
3084
3090
|
}
|
|
3085
3091
|
function createIncludeFileFilterFn(includeGlobPatterns, root, dot) {
|
|
3086
3092
|
if (!includeGlobPatterns?.length) return () => true;
|
|
@@ -3176,9 +3182,7 @@ function extractUnknownWordsConfig(options) {
|
|
|
3176
3182
|
case "typos":
|
|
3177
3183
|
config.unknownWords = unknownWordsChoices.ReportCommonTypos;
|
|
3178
3184
|
break;
|
|
3179
|
-
case "flagged":
|
|
3180
|
-
config.unknownWords = unknownWordsChoices.ReportFlagged;
|
|
3181
|
-
break;
|
|
3185
|
+
case "flagged": config.unknownWords = unknownWordsChoices.ReportFlagged;
|
|
3182
3186
|
}
|
|
3183
3187
|
return config;
|
|
3184
3188
|
}
|
|
@@ -3328,7 +3332,8 @@ function extractSpecialDictionaries(config) {
|
|
|
3328
3332
|
}
|
|
3329
3333
|
async function listDictionaries(options) {
|
|
3330
3334
|
const configFile = await readConfig(options.config, void 0);
|
|
3331
|
-
const
|
|
3335
|
+
const loadDefault = options.defaultConfiguration ?? configFile.config.loadDefaultConfiguration ?? true;
|
|
3336
|
+
const configBase = mergeSettings(await getDefaultSettings(loadDefault), await getGlobalSettingsAsync(), configFile.config);
|
|
3332
3337
|
const useFileType = options.fileType === "text" ? "plaintext" : options.fileType;
|
|
3333
3338
|
if (options.locale) configBase.language = options.locale;
|
|
3334
3339
|
const config = combineTextAndLanguageSettings(configBase, "", useFileType || configBase.languageId || "plaintext");
|
|
@@ -3387,7 +3392,8 @@ async function* trace(words, options) {
|
|
|
3387
3392
|
const loadDefault = options.defaultConfiguration ?? configFile.config.loadDefaultConfiguration ?? true;
|
|
3388
3393
|
const additionalSettings = {};
|
|
3389
3394
|
if (options.dictionary) additionalSettings.dictionaries = options.dictionary;
|
|
3390
|
-
|
|
3395
|
+
const config = mergeSettings(await getDefaultSettings(loadDefault), await getGlobalSettingsAsync(), configFile.config, additionalSettings);
|
|
3396
|
+
yield* traceWordsAsync(iWords, config, clean({
|
|
3391
3397
|
languageId,
|
|
3392
3398
|
locale,
|
|
3393
3399
|
ignoreCase,
|
|
@@ -3454,4 +3460,4 @@ function parseApplicationFeatureFlags(flags) {
|
|
|
3454
3460
|
//#endregion
|
|
3455
3461
|
export { ApplicationError as C, width as S, console as T, padLeft as _, parseApplicationFeatureFlags as a, pruneAnsiTextEnd as b, listDictionaries as c, validateUnitSize as d, unindent as f, tableToLines as g, getReporter as h, lint as i, ReportChoicesAll as l, npmPackage as m, checkText as n, suggestions as o, DEFAULT_CACHE_LOCATION as p, createInit as r, trace as s, IncludeExcludeFlag as t, cvtLinterCliCommandOptionsToLinterCliOptions as u, padWidth as v, CheckFailed as w, pruneAnsiTextStart as x, ansiWidth as y };
|
|
3456
3462
|
|
|
3457
|
-
//# sourceMappingURL=application-
|
|
3463
|
+
//# sourceMappingURL=application-BcBLKy3U.js.map
|
|
@@ -1,66 +1,65 @@
|
|
|
1
|
-
import { a as SuggestionOptions, i as LinterCliOptions, n as DictionariesOptions, o as TraceOptions, r as LegacyOptions, t as BaseOptions } from "./options-
|
|
1
|
+
import { a as SuggestionOptions, i as LinterCliOptions, n as DictionariesOptions, o as TraceOptions, r as LegacyOptions, t as BaseOptions } from "./options-CG62AIq-.js";
|
|
2
2
|
import { CheckTextInfo, FeatureFlags, IncludeExcludeFlag, SuggestionsForWordResult, TraceResult, TraceWordResult } from "cspell-lib";
|
|
3
3
|
import { CSpellReporter, RunResult } from "@cspell/cspell-types";
|
|
4
|
-
|
|
5
4
|
//#region src/config/options.d.ts
|
|
6
5
|
interface BaseConfigOptions {
|
|
7
6
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
* The path to the configuration file to create / update.
|
|
8
|
+
* If not provided, a default file name will be used based on the format.
|
|
9
|
+
*/
|
|
11
10
|
config?: string;
|
|
12
11
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
* The list of configuration files or dictionary packages to import.
|
|
13
|
+
* This can be a list of file paths, package names, or URLs.
|
|
14
|
+
*/
|
|
16
15
|
import?: string[];
|
|
17
16
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
* The locale to use when spell checking (e.g., en, en-US, de).
|
|
18
|
+
*/
|
|
20
19
|
locale?: string;
|
|
21
20
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
* Whether to add comments to the configuration file.
|
|
22
|
+
* - `true` - comments will be added to the configuration file.
|
|
23
|
+
* - `false` - no comments will be added.
|
|
24
|
+
* - `undefined` - the default behavior will be used based on the format.
|
|
25
|
+
*/
|
|
27
26
|
comments?: boolean;
|
|
28
27
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
* Whether to remove all comments from the configuration file.
|
|
29
|
+
* - `true` - all comments will be removed.
|
|
30
|
+
* - `false` | `undefined` - no comments will be removed.
|
|
31
|
+
* @implies `comments: false`
|
|
32
|
+
*/
|
|
34
33
|
removeComments?: boolean;
|
|
35
34
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
* Whether to add the schema reference to the configuration file.
|
|
36
|
+
* - `true` - the schema reference will be added / updated.
|
|
37
|
+
* - `false` - no schema reference will be added.
|
|
38
|
+
*/
|
|
40
39
|
schema?: boolean;
|
|
41
40
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
* The list of dictionaries to enable in the configuration file.
|
|
42
|
+
* These are added to an existing configuration file or a new one.
|
|
43
|
+
* Existing dictionaries will not be removed.
|
|
44
|
+
*/
|
|
46
45
|
dictionary?: string[];
|
|
47
46
|
/**
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
* Whether to write the configuration to stdout instead of a file.
|
|
48
|
+
*/
|
|
50
49
|
stdout?: boolean;
|
|
51
50
|
}
|
|
52
51
|
interface InitOptions extends BaseConfigOptions {
|
|
53
52
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
* The path where the configuration file will be written, it can be a file path or a URL.
|
|
54
|
+
* If not provided, a default file name will be used based on the format.
|
|
55
|
+
* The default will be `cspell.config.yaml` or `cspell.json` based on the format.
|
|
56
|
+
* @conflicts `config` - If `config` is provided, it will be used instead of `output`.
|
|
57
|
+
*/
|
|
59
58
|
output?: string;
|
|
60
59
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
* The format of the configuration file.
|
|
61
|
+
* @conflicts `config` - If `config` is provided, the format will be inferred from the file extension.
|
|
62
|
+
*/
|
|
64
63
|
format?: "yaml" | "yml" | "json" | "jsonc";
|
|
65
64
|
}
|
|
66
65
|
//#endregion
|
|
@@ -72,36 +71,36 @@ interface TimedSuggestionsForWordResult extends SuggestionsForWordResult {
|
|
|
72
71
|
//#region src/dictionaries/listDictionaries.d.ts
|
|
73
72
|
interface ListDictionariesResult {
|
|
74
73
|
/**
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
* The name of the dictionary.
|
|
75
|
+
*/
|
|
77
76
|
name: string;
|
|
78
77
|
/**
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
* The description of the dictionary.
|
|
79
|
+
*/
|
|
81
80
|
description?: string | undefined;
|
|
82
81
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
* The path to the dictionary file.
|
|
83
|
+
*/
|
|
85
84
|
path?: string | undefined;
|
|
86
85
|
/**
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
* True if the dictionary is enabled.
|
|
87
|
+
*/
|
|
89
88
|
enabled: boolean;
|
|
90
89
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
* True if the dictionary is blocked.
|
|
91
|
+
*/
|
|
93
92
|
blocked: boolean;
|
|
94
93
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
* The inline dictionaries supported by the dictionary.
|
|
95
|
+
*/
|
|
97
96
|
inline?: string[] | undefined;
|
|
98
97
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
* the languages locales supported by the dictionary.
|
|
99
|
+
*/
|
|
101
100
|
locales?: string[] | undefined;
|
|
102
101
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
* The file types supported by the dictionary.
|
|
103
|
+
*/
|
|
105
104
|
fileTypes?: string[] | undefined;
|
|
106
105
|
}
|
|
107
106
|
declare function listDictionaries(options: DictionariesOptions): Promise<ListDictionariesResult[]>;
|
|
@@ -117,4 +116,4 @@ declare function createInit(options: InitOptions): Promise<void>;
|
|
|
117
116
|
declare function parseApplicationFeatureFlags(flags: string[] | undefined): FeatureFlags;
|
|
118
117
|
//#endregion
|
|
119
118
|
export { checkText as a, parseApplicationFeatureFlags as c, listDictionaries as d, TraceResult as i, suggestions as l, CheckTextResult as n, createInit as o, IncludeExcludeFlag as r, lint as s, AppError as t, trace as u };
|
|
120
|
-
//# sourceMappingURL=application-
|
|
119
|
+
//# sourceMappingURL=application-BeYqH0KN.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as checkText, c as parseApplicationFeatureFlags, d as listDictionaries, i as TraceResult, l as suggestions, n as CheckTextResult, o as createInit, r as IncludeExcludeFlag, s as lint, t as AppError, u as trace } from "./application-
|
|
1
|
+
import { a as checkText, c as parseApplicationFeatureFlags, d as listDictionaries, i as TraceResult, l as suggestions, n as CheckTextResult, o as createInit, r as IncludeExcludeFlag, s as lint, t as AppError, u as trace } from "./application-BeYqH0KN.js";
|
|
2
2
|
export { AppError, CheckTextResult, IncludeExcludeFlag, type TraceResult, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
package/dist/esm/application.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as parseApplicationFeatureFlags, c as listDictionaries, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-
|
|
1
|
+
import { a as parseApplicationFeatureFlags, c as listDictionaries, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-BcBLKy3U.js";
|
|
2
2
|
export { IncludeExcludeFlag, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as LinterCliOptions, o as TraceOptions, s as FinalizedReporter, t as BaseOptions } from "./options-
|
|
2
|
-
import { a as checkText, c as parseApplicationFeatureFlags, d as listDictionaries, i as TraceResult, l as suggestions, n as CheckTextResult, o as createInit, r as IncludeExcludeFlag, s as lint, t as AppError, u as trace } from "./application-
|
|
1
|
+
import { i as LinterCliOptions, o as TraceOptions, s as FinalizedReporter, t as BaseOptions } from "./options-CG62AIq-.js";
|
|
2
|
+
import { a as checkText, c as parseApplicationFeatureFlags, d as listDictionaries, i as TraceResult, l as suggestions, n as CheckTextResult, o as createInit, r as IncludeExcludeFlag, s as lint, t as AppError, u as trace } from "./application-BeYqH0KN.js";
|
|
3
|
+
import "chalk";
|
|
3
4
|
import { CSpellReporter, ReporterConfiguration } from "@cspell/cspell-types";
|
|
4
5
|
import { WriteStream } from "node:tty";
|
|
5
6
|
export * from "@cspell/cspell-types";
|
|
6
|
-
|
|
7
7
|
//#region src/console.d.ts
|
|
8
8
|
type Log = (format?: any, ...params: any[]) => void;
|
|
9
9
|
type IOStream = NodeJS.WritableStream & Pick<WriteStream, "isTTY" | "rows" | "columns"> & Pick<Partial<WriteStream>, "hasColors" | "clearLine" | "getColorDepth">;
|
|
@@ -28,9 +28,9 @@ interface Channel {
|
|
|
28
28
|
type ReporterConsole = IConsole;
|
|
29
29
|
interface CSpellReporterConfiguration extends Readonly<ReporterConfiguration>, Readonly<LinterCliOptions> {
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
* The console to use for reporting.
|
|
32
|
+
* @since 8.11.1
|
|
33
|
+
*/
|
|
34
34
|
readonly console?: ReporterConsole;
|
|
35
35
|
}
|
|
36
36
|
interface CSpellReporterModule {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as parseApplicationFeatureFlags, c as listDictionaries, h as getReporter, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-
|
|
1
|
+
import { a as parseApplicationFeatureFlags, c as listDictionaries, h as getReporter, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-BcBLKy3U.js";
|
|
2
2
|
export * from "@cspell/cspell-types";
|
|
3
3
|
export { IncludeExcludeFlag, checkText, createInit, getReporter as getDefaultReporter, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import "cspell-lib";
|
|
2
|
+
import { CSpellReporter, CSpellSettings, CacheFormat, CacheStrategy, ReporterConfiguration, RunResult } from "@cspell/cspell-types";
|
|
3
|
+
import { GlobMatcher } from "cspell-glob";
|
|
4
|
+
import "cspell-io";
|
|
5
|
+
//#region src/util/cache/CacheOptions.d.ts
|
|
6
|
+
interface CacheOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The version of `cspell` that made the cache entry.
|
|
9
|
+
* Cache entries must match the `major.minor` version.
|
|
10
|
+
*/
|
|
11
|
+
version: string;
|
|
12
|
+
/**
|
|
13
|
+
* Store the info about processed files in order to only operate on the changed ones.
|
|
14
|
+
*/
|
|
15
|
+
cache?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Path to the cache location. Can be a file or a directory.
|
|
18
|
+
* If none specified .cspellcache will be used.
|
|
19
|
+
* The file will be created in the directory where the cspell command is executed.
|
|
20
|
+
*/
|
|
21
|
+
cacheLocation?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Strategy to use for detecting changed files, default: metadata
|
|
24
|
+
*/
|
|
25
|
+
cacheStrategy?: CacheStrategy;
|
|
26
|
+
/**
|
|
27
|
+
* Resets the cache
|
|
28
|
+
*/
|
|
29
|
+
cacheReset?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Format of the cache file.
|
|
32
|
+
* - `legacy` - use absolute paths in the cache file
|
|
33
|
+
* - `universal` - use a sharable format.
|
|
34
|
+
* @default 'legacy'
|
|
35
|
+
*/
|
|
36
|
+
cacheFormat?: CacheFormat;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/reporters/LintFileResult.d.ts
|
|
40
|
+
type FinalizedReporter = Required<CSpellReporter>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/options.d.ts
|
|
43
|
+
interface LinterOptions extends Omit<BaseOptions, "config">, Omit<CacheOptions, "version">, ReporterConfiguration {
|
|
44
|
+
/**
|
|
45
|
+
* Display verbose information
|
|
46
|
+
*/
|
|
47
|
+
verbose?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Level of verbosity (higher number = more verbose).
|
|
50
|
+
*/
|
|
51
|
+
verboseLevel?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Show extensive output.
|
|
54
|
+
*/
|
|
55
|
+
debug?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* a globs to exclude files from being checked.
|
|
58
|
+
*/
|
|
59
|
+
exclude?: string[] | string;
|
|
60
|
+
/**
|
|
61
|
+
* Only report the words, no line numbers or file names.
|
|
62
|
+
*/
|
|
63
|
+
wordsOnly?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* unique errors per file only.
|
|
66
|
+
*/
|
|
67
|
+
unique?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* root directory, defaults to `cwd`
|
|
70
|
+
*/
|
|
71
|
+
root?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Determine if files / directories starting with `.` should be part
|
|
74
|
+
* of the glob search.
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
dot?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Show part of a line where an issue is found.
|
|
80
|
+
* - if true, it will show the default number of characters on either side.
|
|
81
|
+
* - if a number, the number of characters to show on either side of the issue.
|
|
82
|
+
*/
|
|
83
|
+
showContext?: boolean | number;
|
|
84
|
+
/**
|
|
85
|
+
* Show suggestions for spelling errors.
|
|
86
|
+
*/
|
|
87
|
+
showSuggestions?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Enable filtering out files matching globs found in `.gitignore` files.
|
|
90
|
+
*/
|
|
91
|
+
gitignore?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Stop searching for a `.gitignore`s when a root is reached.
|
|
94
|
+
*/
|
|
95
|
+
gitignoreRoot?: string | string[];
|
|
96
|
+
/**
|
|
97
|
+
* List of files that contains the paths to files to be spell checked.
|
|
98
|
+
* The files in the lists will be filtered against the glob patterns.
|
|
99
|
+
* - an entry of `stdin` means to read the file list from **`stdin`**
|
|
100
|
+
* The resulting files are filtered against the `files` globs found in the configuration.
|
|
101
|
+
*/
|
|
102
|
+
fileList?: string[] | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* List of file paths to spell check. These can be relative or absolute
|
|
105
|
+
* paths, but not Globs. Relative paths are relative to {@link LinterOptions.root}.
|
|
106
|
+
* The files are combined with the file paths read from {@link LinterOptions.fileList}.
|
|
107
|
+
* These files are filtered against the `files` globs found in the configuration.
|
|
108
|
+
*/
|
|
109
|
+
files?: string[] | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Alias of {@link LinterOptions.files}.
|
|
112
|
+
*/
|
|
113
|
+
file?: string[] | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Use the `files` configuration to filter the files found.
|
|
116
|
+
*/
|
|
117
|
+
filterFiles?: boolean | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* Files must be found and processed otherwise it is considered an error.
|
|
120
|
+
*/
|
|
121
|
+
mustFindFiles?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* List of dictionary names to use.
|
|
124
|
+
*/
|
|
125
|
+
dictionary?: string[] | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* List of dictionary names to disable.
|
|
128
|
+
*/
|
|
129
|
+
disableDictionary?: string[] | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Stop processing and exit if an issue or error is found.
|
|
132
|
+
*/
|
|
133
|
+
failFast?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Keep going even if an error is found.
|
|
136
|
+
*/
|
|
137
|
+
continueOnError?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Optional list of reporters to use, overriding any specified in the
|
|
140
|
+
* configuration.
|
|
141
|
+
*/
|
|
142
|
+
reporter?: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Load and parse documents, but do not spell check.
|
|
145
|
+
*/
|
|
146
|
+
skipValidation?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Path to configuration file.
|
|
149
|
+
*/
|
|
150
|
+
config?: string | CSpellConfigFile;
|
|
151
|
+
/**
|
|
152
|
+
* Specify the maximum file size to be checked.
|
|
153
|
+
* The value can include a units suffix: `KB`, `MB`, `B`, `GB`.
|
|
154
|
+
* The numeric value can include a decimal.
|
|
155
|
+
* Example: 1.5MB
|
|
156
|
+
*/
|
|
157
|
+
maxFileSize?: string | undefined;
|
|
158
|
+
}
|
|
159
|
+
interface TraceOptions extends BaseOptions {
|
|
160
|
+
/**
|
|
161
|
+
* Use stdin for the input.
|
|
162
|
+
*/
|
|
163
|
+
stdin?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Enable the `allowCompoundWords` option.
|
|
166
|
+
*/
|
|
167
|
+
allowCompoundWords?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Ignore case and accents when searching for words.
|
|
170
|
+
*/
|
|
171
|
+
ignoreCase?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Show all dictionaries, not just the ones that contain the words or are enabled.
|
|
174
|
+
*/
|
|
175
|
+
all?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Show only dictionaries that contain the words.
|
|
178
|
+
* If `all` is set, this option is ignored.
|
|
179
|
+
*/
|
|
180
|
+
onlyFound?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Names of dictionaries to use.
|
|
183
|
+
*/
|
|
184
|
+
dictionary?: string[] | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* Configure how to display the dictionary path.
|
|
187
|
+
*/
|
|
188
|
+
dictionaryPath?: "hide" | "long" | "short" | "full";
|
|
189
|
+
}
|
|
190
|
+
interface SuggestionOptions extends BaseOptions {
|
|
191
|
+
/**
|
|
192
|
+
* Strict case and accent checking
|
|
193
|
+
* @default true
|
|
194
|
+
*/
|
|
195
|
+
strict?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* List of dictionaries to use. If specified, only that list of dictionaries will be used.
|
|
198
|
+
*/
|
|
199
|
+
dictionaries?: string[] | undefined;
|
|
200
|
+
/**
|
|
201
|
+
* The number of suggestions to make.
|
|
202
|
+
* @default 8
|
|
203
|
+
*/
|
|
204
|
+
numSuggestions?: number;
|
|
205
|
+
/**
|
|
206
|
+
* Max number of changes / edits to the word to get to a suggestion matching suggestion.
|
|
207
|
+
* @default 4
|
|
208
|
+
*/
|
|
209
|
+
numChanges?: number;
|
|
210
|
+
/**
|
|
211
|
+
* If multiple suggestions have the same edit / change "cost", then included them even if
|
|
212
|
+
* it causes more than `numSuggestions` to be returned.
|
|
213
|
+
* @default true
|
|
214
|
+
*/
|
|
215
|
+
includeTies?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Use stdin for the input
|
|
218
|
+
*/
|
|
219
|
+
useStdin?: boolean | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* Use REPL interface for making suggestions.
|
|
222
|
+
*/
|
|
223
|
+
repl?: boolean;
|
|
224
|
+
}
|
|
225
|
+
interface DictionariesOptions {
|
|
226
|
+
/**
|
|
227
|
+
* Path to configuration file.
|
|
228
|
+
*/
|
|
229
|
+
config?: string;
|
|
230
|
+
/**
|
|
231
|
+
* Load the default configuration
|
|
232
|
+
* @default true
|
|
233
|
+
*/
|
|
234
|
+
defaultConfiguration?: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Use color in the output.
|
|
237
|
+
* `true` to force color, `false` to turn off color.
|
|
238
|
+
* `undefined` to use color if the output is a TTY.
|
|
239
|
+
*/
|
|
240
|
+
color?: boolean | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* Show enabled:
|
|
243
|
+
* - `true` to show only enabled dictionaries.
|
|
244
|
+
* - `false` to show only disabled dictionaries.
|
|
245
|
+
* - `undefined` to show all dictionaries.
|
|
246
|
+
*/
|
|
247
|
+
enabled?: boolean | undefined;
|
|
248
|
+
/**
|
|
249
|
+
* The locale to use when listing dictionaries.
|
|
250
|
+
*/
|
|
251
|
+
locale?: string;
|
|
252
|
+
/**
|
|
253
|
+
* The file type to use when listing dictionaries.
|
|
254
|
+
*/
|
|
255
|
+
fileType?: string;
|
|
256
|
+
/**
|
|
257
|
+
* show the language locales supported by the dictionary.
|
|
258
|
+
*/
|
|
259
|
+
showLocales?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* show the file types supported by the dictionary.
|
|
262
|
+
*/
|
|
263
|
+
showFileTypes?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Dhow the location of the dictionary.
|
|
266
|
+
*/
|
|
267
|
+
showLocation?: boolean;
|
|
268
|
+
pathFormat?: "hide" | "short" | "long" | "full";
|
|
269
|
+
}
|
|
270
|
+
interface LegacyOptions {
|
|
271
|
+
local?: string;
|
|
272
|
+
}
|
|
273
|
+
interface BaseOptions {
|
|
274
|
+
/**
|
|
275
|
+
* Path to configuration file.
|
|
276
|
+
*/
|
|
277
|
+
config?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Programming Language ID.
|
|
280
|
+
*/
|
|
281
|
+
languageId?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Locale to use.
|
|
284
|
+
*/
|
|
285
|
+
locale?: string;
|
|
286
|
+
/**
|
|
287
|
+
* Load the default configuration
|
|
288
|
+
* @default true
|
|
289
|
+
*/
|
|
290
|
+
defaultConfiguration?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Check In-Document CSpell directives for correctness.
|
|
293
|
+
*/
|
|
294
|
+
validateDirectives?: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Return an exit code if there are issues found.
|
|
297
|
+
* @default true
|
|
298
|
+
*/
|
|
299
|
+
exitCode?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Execution flags.
|
|
302
|
+
* Used primarily for releasing experimental features.
|
|
303
|
+
* Flags are of the form key:value
|
|
304
|
+
*/
|
|
305
|
+
flag?: string[];
|
|
306
|
+
/**
|
|
307
|
+
* Use color in the output.
|
|
308
|
+
* `true` to force color, `false` to turn off color.
|
|
309
|
+
* `undefined` to use color if the output is a TTY.
|
|
310
|
+
*/
|
|
311
|
+
color?: boolean | undefined;
|
|
312
|
+
}
|
|
313
|
+
interface LinterCliOptions extends LinterOptions {
|
|
314
|
+
/**
|
|
315
|
+
* Show legacy output
|
|
316
|
+
*/
|
|
317
|
+
legacy?: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Show summary at the end
|
|
320
|
+
*/
|
|
321
|
+
summary?: boolean;
|
|
322
|
+
/**
|
|
323
|
+
* Show issues
|
|
324
|
+
*/
|
|
325
|
+
issues?: boolean;
|
|
326
|
+
/**
|
|
327
|
+
* Run in silent mode.
|
|
328
|
+
* @default false
|
|
329
|
+
*/
|
|
330
|
+
silent?: boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Show progress
|
|
333
|
+
*/
|
|
334
|
+
progress?: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* issues are shown with a relative path to the root or `cwd`
|
|
337
|
+
*/
|
|
338
|
+
relative?: boolean;
|
|
339
|
+
/**
|
|
340
|
+
* Files must be found or cli will exit with an error.
|
|
341
|
+
*/
|
|
342
|
+
mustFindFiles?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Generate a summary report of issues.
|
|
345
|
+
*/
|
|
346
|
+
issuesSummaryReport?: boolean;
|
|
347
|
+
/**
|
|
348
|
+
* Generate a summary report of performance.
|
|
349
|
+
*/
|
|
350
|
+
showPerfSummary?: boolean;
|
|
351
|
+
/**
|
|
352
|
+
* Set the template to use when reporting issues.
|
|
353
|
+
*
|
|
354
|
+
* The template is a string that can contain the following placeholders:
|
|
355
|
+
* - `$filename` - the file name
|
|
356
|
+
* - `$col` - the column number
|
|
357
|
+
* - `$row` - the row number
|
|
358
|
+
* - `$text` - the word that is misspelled
|
|
359
|
+
* - `$message` - the issues message: "unknown word", "word is misspelled", etc.
|
|
360
|
+
* - `$messageColored` - the issues message with color based upon the message type.
|
|
361
|
+
* - `$uri` - the URI of the file
|
|
362
|
+
* - `$suggestions` - suggestions for the misspelled word (if requested)
|
|
363
|
+
* - `$quickFix` - possible quick fixes for the misspelled word.
|
|
364
|
+
* - `$contextFull` - the full context of the misspelled word.
|
|
365
|
+
* - `$contextLeft` - the context to the left of the misspelled word.
|
|
366
|
+
* - `$contextRight` - the context to the right of the misspelled word.
|
|
367
|
+
*
|
|
368
|
+
* Color is supported using the following template pattern:
|
|
369
|
+
* - `{<style[.style]> <text>}` - where `<style>` is a style name and `<text>` is the text to style.
|
|
370
|
+
*
|
|
371
|
+
* Styles
|
|
372
|
+
* - `bold`, `italic`, `underline`, `strikethrough`, `dim`, `inverse`
|
|
373
|
+
* - `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`
|
|
374
|
+
*
|
|
375
|
+
* Example:
|
|
376
|
+
* @example "{green $filename}:{yellow $row}:{yellow $col} $message {red $text} $quickFix {dim $suggestions}"
|
|
377
|
+
* @since 8.12.0
|
|
378
|
+
*/
|
|
379
|
+
issueTemplate?: string;
|
|
380
|
+
/**
|
|
381
|
+
* Prevents searching for local configuration files
|
|
382
|
+
*
|
|
383
|
+
* When `--no-config-search` is passed on the command line, this will be `true`.
|
|
384
|
+
* If the flag is not passed, it defaults to `false`.
|
|
385
|
+
*/
|
|
386
|
+
configSearch?: boolean;
|
|
387
|
+
/**
|
|
388
|
+
* Directory paths at which CSpell should stop searching for configuration files.
|
|
389
|
+
*
|
|
390
|
+
* These are set via one or more `--stop-config-search-at <dir>` CLI options.
|
|
391
|
+
* If no flags are passed, this will be `undefined`.
|
|
392
|
+
*/
|
|
393
|
+
stopConfigSearchAt?: string[];
|
|
394
|
+
report?: ReportChoices | undefined;
|
|
395
|
+
}
|
|
396
|
+
type ReportChoices = "all" | "simple" | "typos" | "flagged";
|
|
397
|
+
interface CSpellConfigFile {
|
|
398
|
+
url: URL;
|
|
399
|
+
settings: CSpellSettings;
|
|
400
|
+
}
|
|
401
|
+
//#endregion
|
|
402
|
+
export { SuggestionOptions as a, LinterCliOptions as i, DictionariesOptions as n, TraceOptions as o, LegacyOptions as r, FinalizedReporter as s, BaseOptions as t };
|
|
403
|
+
//# sourceMappingURL=options-CG62AIq-.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.1",
|
|
4
4
|
"description": "A Spelling Checker for Code!",
|
|
5
5
|
"funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
|
|
6
6
|
"bin": {
|
|
@@ -81,41 +81,45 @@
|
|
|
81
81
|
],
|
|
82
82
|
"author": "Jason Dent",
|
|
83
83
|
"license": "MIT",
|
|
84
|
+
"publishConfig": {
|
|
85
|
+
"access": "public",
|
|
86
|
+
"provenance": true
|
|
87
|
+
},
|
|
84
88
|
"bugs": {
|
|
85
89
|
"url": "https://github.com/streetsidesoftware/cspell/issues"
|
|
86
90
|
},
|
|
87
91
|
"homepage": "https://cspell.org/",
|
|
88
92
|
"dependencies": {
|
|
89
|
-
"@cspell/cspell-json-reporter": "10.
|
|
90
|
-
"@cspell/cspell-performance-monitor": "10.
|
|
91
|
-
"@cspell/cspell-pipe": "10.
|
|
92
|
-
"@cspell/cspell-types": "10.
|
|
93
|
-
"@cspell/cspell-worker": "10.
|
|
94
|
-
"@cspell/dynamic-import": "10.
|
|
95
|
-
"@cspell/url": "10.
|
|
96
|
-
"ansi-regex": "^6.
|
|
97
|
-
"chalk": "^
|
|
93
|
+
"@cspell/cspell-json-reporter": "10.1.1",
|
|
94
|
+
"@cspell/cspell-performance-monitor": "10.1.1",
|
|
95
|
+
"@cspell/cspell-pipe": "10.1.1",
|
|
96
|
+
"@cspell/cspell-types": "10.1.1",
|
|
97
|
+
"@cspell/cspell-worker": "10.1.1",
|
|
98
|
+
"@cspell/dynamic-import": "10.1.1",
|
|
99
|
+
"@cspell/url": "10.1.1",
|
|
100
|
+
"ansi-regex": "^6.3.0",
|
|
101
|
+
"chalk": "^6.0.0",
|
|
98
102
|
"chalk-template": "^1.1.2",
|
|
99
|
-
"commander": "^
|
|
100
|
-
"cspell-config-lib": "10.
|
|
101
|
-
"cspell-dictionary": "10.
|
|
102
|
-
"cspell-gitignore": "10.
|
|
103
|
-
"cspell-glob": "10.
|
|
104
|
-
"cspell-io": "10.
|
|
105
|
-
"cspell-lib": "10.
|
|
103
|
+
"commander": "^15.0.0",
|
|
104
|
+
"cspell-config-lib": "10.1.1",
|
|
105
|
+
"cspell-dictionary": "10.1.1",
|
|
106
|
+
"cspell-gitignore": "10.1.1",
|
|
107
|
+
"cspell-glob": "10.1.1",
|
|
108
|
+
"cspell-io": "10.1.1",
|
|
109
|
+
"cspell-lib": "10.1.1",
|
|
106
110
|
"fast-json-stable-stringify": "^2.1.0",
|
|
107
|
-
"flatted": "^3.4.
|
|
108
|
-
"semver": "^7.8.
|
|
109
|
-
"tinyglobby": "^0.2.
|
|
111
|
+
"flatted": "^3.4.4",
|
|
112
|
+
"semver": "^7.8.5",
|
|
113
|
+
"tinyglobby": "^0.2.17"
|
|
110
114
|
},
|
|
111
115
|
"engines": {
|
|
112
116
|
"node": ">=22.18.0"
|
|
113
117
|
},
|
|
114
118
|
"devDependencies": {
|
|
115
119
|
"@types/micromatch": "^4.0.10",
|
|
116
|
-
"@types/semver": "^7.
|
|
120
|
+
"@types/semver": "^7.8.0",
|
|
117
121
|
"micromatch": "^4.0.8",
|
|
118
122
|
"minimatch": "^9.0.9"
|
|
119
123
|
},
|
|
120
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "bc3bc22aa1aa1b3073768f2ac9cf0d9a06f65177"
|
|
121
125
|
}
|
|
@@ -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-CShRqKvy.d.ts.map
|