cspell 9.4.0 → 9.6.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 CHANGED
@@ -12,13 +12,13 @@ A Spell Checker for Code!
12
12
 
13
13
  <!--- @@inject: ../../static/sponsor.md --->
14
14
 
15
- - [![GitHub Sponsors](https://img.shields.io/badge/-black?style=social&logo=githubsponsors&label=GitHub%20Sponsor%3A%20Street%20Side%20Software)](https://github.com/sponsors/streetsidesoftware)
16
- - [![PayPal](https://img.shields.io/badge/-black?style=social&logo=paypal&label=PayPal%20Donate%3A%20Street%20Side%20Software)](https://www.paypal.com/donate/?hosted_button_id=26LNBP2Q6MKCY)
17
- - [![Open Collective](https://img.shields.io/badge/-black?style=social&logo=opencollective&label=Open%20Collective%3A%20CSpell)](https://opencollective.com/cspell)
15
+ [![GitHub Sponsors](https://img.shields.io/badge/-Street_Side_Software-black?style=for-the-badge&logo=githubsponsors&label=GitHub%20Sponsor%3A)](https://github.com/sponsors/streetsidesoftware)
18
16
 
19
- <!---
20
- - [![Patreon](https://img.shields.io/badge/-black?style=social&logo=patreon&label=Patreon%3A%20Street%20Side%20Software)](https://patreon.com/streetsidesoftware)
21
- --->
17
+ [![Open Collective](https://img.shields.io/badge/-CSpell-black?style=for-the-badge&logo=opencollective&label=Open%20Collective%3A)](https://opencollective.com/cspell)
18
+
19
+ [![Street Side Software](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fstreetsidesoftware%2Fcspell%2Frefs%2Fheads%2Fmain%2Fstatic%2Fcspell-badge.json)](https://streetsidesoftware.com/sponsor/)
20
+
21
+ [![PayPal](https://img.shields.io/badge/-Street_Side_Software-black?style=for-the-badge&logo=paypal&label=PayPal%20Donate%3A)](https://www.paypal.com/donate/?hosted_button_id=26LNBP2Q6MKCY)
22
22
 
23
23
  <!--- @@inject-end: ../../static/sponsor.md --->
24
24
 
@@ -569,6 +569,9 @@ _cspell_'s behavior can be controlled through a config file. By default it looks
569
569
  - `cspell.config.js`
570
570
  - `cspell.config.cjs`
571
571
  - `cspell.config.mjs`
572
+ - `cspell.config.ts`
573
+ - `cspell.config.cts`
574
+ - `cspell.config.mts`
572
575
  - `cspell.config.json`
573
576
  - `cspell.config.yaml`
574
577
  - `cspell.config.yml`
@@ -0,0 +1,8 @@
1
+ let _cspell_cspell_types = require("@cspell/cspell-types");
2
+
3
+ Object.defineProperty(exports, 'defineConfig', {
4
+ enumerable: true,
5
+ get: function () {
6
+ return _cspell_cspell_types.defineConfig;
7
+ }
8
+ });
@@ -0,0 +1,2 @@
1
+ import { defineConfig } from "@cspell/cspell-types";
2
+ export { defineConfig };
package/dist/esm/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as console, S as CheckFailed, _ as unindent, a as parseApplicationFeatureFlags, c as listDictionaries, d as ansiWidth, f as pruneAnsiTextEnd, g as validateUnitSize, h as width, i as lint, l as ReportChoicesAll, m as pruneTextEnd, n as checkText, o as suggestions, p as pruneAnsiTextStart, r as createInit, s as trace, t as IncludeExcludeFlag, u as cvtLinterCliCommandOptionsToLinterCliOptions, v as DEFAULT_CACHE_LOCATION, x as ApplicationError, y as npmPackage } from "./application-DCyfKhGm.js";
1
+ import { C as CheckFailed, S as ApplicationError, _ as padLeft, a as parseApplicationFeatureFlags, b as pruneAnsiTextStart, 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 console, x as width, y as pruneAnsiTextEnd } from "./application-DaQrXF9X.js";
2
2
  import { Link } from "cspell-lib";
3
3
  import chalk from "chalk";
4
4
  import * as iPath from "node:path";
@@ -40,7 +40,7 @@ function commandCheck(prog) {
40
40
  * @param previous the previous values.
41
41
  * @returns the new values appended to the previous values.
42
42
  */
43
- function collect(value, previous) {
43
+ function collect$1(value, previous) {
44
44
  const values = Array.isArray(value) ? value : [value];
45
45
  return previous ? [...previous, ...values] : values;
46
46
  }
@@ -59,117 +59,6 @@ function crOpt(name, description, parseArg, defaultValue) {
59
59
  return option;
60
60
  }
61
61
 
62
- //#endregion
63
- //#region src/util/pad.ts
64
- function pad(s, w) {
65
- const p = padWidth(s, w);
66
- if (!p) return s;
67
- return s.padEnd(p + s.length);
68
- }
69
- function padWidth(s, target) {
70
- const sWidth = ansiWidth(s);
71
- return Math.max(target - sWidth, 0);
72
- }
73
- function padLeft(s, w) {
74
- const p = padWidth(s, w);
75
- if (!p) return s;
76
- return s.padStart(p + s.length);
77
- }
78
-
79
- //#endregion
80
- //#region src/util/table.ts
81
- function tableToLines(table, deliminator) {
82
- const del = deliminator || table.deliminator || " | ";
83
- const columnWidths = [];
84
- const maxColumnWidthsMap = table.maxColumnWidths || {};
85
- const { header, rows } = table;
86
- const simpleHeader = header.map((col) => Array.isArray(col) ? col[1] : col);
87
- const columnFieldNames = header.map((col) => Array.isArray(col) ? col[0] : col);
88
- const maxColumnWidths = columnFieldNames.map((field, idx) => maxColumnWidthsMap[field] ?? maxColumnWidthsMap[idx]);
89
- function getCell(row, col) {
90
- return getCellFromRow(rows[row], col);
91
- }
92
- function getCellFromRow(row, col) {
93
- if (!row) return void 0;
94
- if (Array.isArray(row)) return row[col];
95
- return row[columnFieldNames[col]];
96
- }
97
- function rowToCells(row) {
98
- if (Array.isArray(row)) return row;
99
- return columnFieldNames.map((fieldName) => row[fieldName]);
100
- }
101
- function getText(col, maxWidth$2) {
102
- return !col ? "" : typeof col === "string" ? pruneTextEnd(col, maxWidth$2) : col(maxWidth$2);
103
- }
104
- function getRCText(row, col, maxWidth$2) {
105
- return getText(getCell(row, col), maxWidth$2);
106
- }
107
- function recordHeaderWidths(header$1) {
108
- header$1.forEach((col, idx) => {
109
- columnWidths[idx] = Math.max(ansiWidth(col), columnWidths[idx] || 0);
110
- });
111
- }
112
- function recordColWidths() {
113
- for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) for (let colIndex = 0; colIndex < columnFieldNames.length; colIndex++) columnWidths[colIndex] = Math.max(ansiWidth(getRCText(rowIndex, colIndex, void 0)), columnWidths[colIndex] || 0);
114
- }
115
- function justifyRow(c, i) {
116
- return pad(c, columnWidths[i]);
117
- }
118
- function toHeaderLine(header$1) {
119
- return decorateRowWith(header$1.map((c, i) => getText(c, columnWidths[i])), justifyRow, headerDecorator).join(del);
120
- }
121
- function toLine(row) {
122
- return decorateRowWith(rowToCells(row).map((c, i) => getText(c, columnWidths[i])), justifyRow).join(del);
123
- }
124
- function* process$1() {
125
- yield toHeaderLine(simpleHeader);
126
- yield* rows.map(toLine);
127
- }
128
- function sumColumnWidths() {
129
- return columnWidths.reduce((sum, width$1) => sum + width$1, 0);
130
- }
131
- function adjustColWidths() {
132
- for (let i = 0; i < columnWidths.length; i++) {
133
- const mw = maxColumnWidths[i];
134
- if (!mw) continue;
135
- columnWidths[i] = Math.min(columnWidths[i], mw);
136
- }
137
- if (!table.terminalWidth) return;
138
- const dWidth = (columnWidths.length - 1) * ansiWidth(del);
139
- const lineWidth = table.terminalWidth - dWidth;
140
- if (lineWidth <= columnWidths.length * 2) {
141
- const fixedWidth = Math.max(Math.min(...columnWidths), 5);
142
- for (let i = 0; i < columnWidths.length; i++) columnWidths[i] = fixedWidth;
143
- return;
144
- }
145
- if (columnWidths.length === 1) {
146
- columnWidths[0] = lineWidth;
147
- return;
148
- }
149
- function trimWidestColumn(neededToTrim) {
150
- let first = 0;
151
- let second = 0;
152
- for (let i = 0; i < columnWidths.length; i++) if (columnWidths[i] > columnWidths[first]) {
153
- second = first;
154
- first = i;
155
- } else if (columnWidths[i] > columnWidths[second]) second = i;
156
- const diff$1 = Math.max(columnWidths[first] - columnWidths[second], 1);
157
- columnWidths[first] -= Math.min(diff$1, neededToTrim);
158
- }
159
- for (let sum = sumColumnWidths(); sum > lineWidth; sum = sumColumnWidths()) trimWidestColumn(sum - lineWidth);
160
- }
161
- recordHeaderWidths(simpleHeader);
162
- recordColWidths();
163
- adjustColWidths();
164
- return [...process$1()];
165
- }
166
- function headerDecorator(t) {
167
- return chalk.bold(chalk.underline(t));
168
- }
169
- function decorateRowWith(row, ...decorators) {
170
- return decorators.reduce((row$1, decorator) => row$1.map(decorator), row);
171
- }
172
-
173
62
  //#endregion
174
63
  //#region src/emitters/helpers.ts
175
64
  function trimMidPath(s, w, sep$1) {
@@ -343,7 +232,7 @@ function commandInit(prog) {
343
232
  "yml",
344
233
  "json",
345
234
  "jsonc"
346
- ]).default("yaml")).option("--import <path|package>", "Import a configuration file or dictionary package.", collect).option("--locale <locale>", "Define the locale to use when spell checking (e.g., en, en-US, de).").addOption(crOpt("--dictionary <dictionary>", "Enable a dictionary. Can be used multiple times.", collect).default(void 0)).addOption(crOpt("--comments", "Add comments to the config file.").default(void 0).hideHelp()).option("--no-comments", "Do not add comments to the config file.").addOption(crOpt("--remove-comments", "Remove all comments from the config file.").implies({ comments: false })).option("--no-schema", "Do not add the schema reference to the config file.").option("--stdout", "Write the configuration to stdout instead of a file.").action((options) => {
235
+ ]).default("yaml")).option("--import <path|package>", "Import a configuration file or dictionary package.", collect$1).option("--locale <locale>", "Define the locale to use when spell checking (e.g., en, en-US, de).").addOption(crOpt("--dictionary <dictionary>", "Enable a dictionary. Can be used multiple times.", collect$1).default(void 0)).addOption(crOpt("--comments", "Add comments to the config file.").default(void 0).hideHelp()).option("--no-comments", "Do not add comments to the config file.").addOption(crOpt("--remove-comments", "Remove all comments from the config file.").implies({ comments: false })).option("--no-schema", "Do not add the schema reference to the config file.").option("--stdout", "Write the configuration to stdout instead of a file.").action((options) => {
347
236
  return createInit(options);
348
237
  });
349
238
  }
@@ -465,10 +354,10 @@ References:
465
354
  `;
466
355
  function commandLint(prog, opts) {
467
356
  const spellCheckCommand = prog.command("lint", opts);
468
- spellCheckCommand.description("Check spelling").option("-c, --config <cspell.json>", "Configuration file to use. By default cspell looks for cspell.json in the current directory.").addOption(crOpt("--config-search", "Allow searching for configuration files.", void 0).hideHelp()).option("--no-config-search", "Disable automatic searching for additional configuration files in parent directories. Only the specified config file (if any) will be used.").option("--stop-config-search-at <dir>", "Specify a directory at which to stop searching for configuration files when walking up from the files being checked. Useful for limiting config inheritance.", collect).option("-v, --verbose", "Display more information about the files being checked. Add more than one -v for increased verbosity.", increaseVerbosity, 0).option("--locale <locale>", "Set language locales. i.e. \"en,fr\" for English and French, or \"en-GB\" for British English.").option("--language-id <file-type>", "Force programming language for unknown extensions. i.e. \"php\" or \"scala\"").addOption(crOpt("--languageId <file-type>", "Alias of \"--language-id\". Force programming language for unknown extensions. i.e. \"php\" or \"scala\"").hideHelp()).option("--words-only", "Only output the words not found in the dictionaries.").addOption(crOpt("--wordsOnly", "Only output the words not found in the dictionaries.").hideHelp()).option("-u, --unique", "Only output the first instance of a word not found in the dictionaries.").option("-e, --exclude <glob>", "Exclude files matching the glob pattern. This option can be used multiple times to add multiple globs. ", collect).option("--file-list <path or stdin>", "Specify a list of files to be spell checked. The list is filtered against the glob file patterns. Note: the format is 1 file path per line.", collect).option("--file [file...]", "Specify files to spell check. They are filtered by the [globs...].", collect).addOption(crOpt("--files [file...]", "Alias of \"--file\". Files to spell check.", collect).hideHelp()).option("--no-issues", "Do not show the spelling errors.").option("--no-progress", "Turn off progress messages").option("--no-summary", "Turn off summary message in console.").option("-s, --silent", "Silent mode, suppress error messages.").option("--no-exit-code", "Do not return an exit code if issues are found.").addOption(crOpt("--quiet", "Only show spelling issues or errors.").implies({
357
+ spellCheckCommand.description("Check spelling").option("-c, --config <cspell.json>", "Configuration file to use. By default cspell looks for cspell.json in the current directory.").addOption(crOpt("--config-search", "Allow searching for configuration files.", void 0).hideHelp()).option("--no-config-search", "Disable automatic searching for additional configuration files in parent directories. Only the specified config file (if any) will be used.").option("--stop-config-search-at <dir>", "Specify a directory at which to stop searching for configuration files when walking up from the files being checked. Useful for limiting config inheritance.", collect$1).option("-v, --verbose", "Display more information about the files being checked. Add more than one -v for increased verbosity.", increaseVerbosity, 0).option("--locale <locale>", "Set language locales. i.e. \"en,fr\" for English and French, or \"en-GB\" for British English.").option("--language-id <file-type>", "Force programming language for unknown extensions. i.e. \"php\" or \"scala\"").addOption(crOpt("--languageId <file-type>", "Alias of \"--language-id\". Force programming language for unknown extensions. i.e. \"php\" or \"scala\"").hideHelp()).option("--words-only", "Only output the words not found in the dictionaries.").addOption(crOpt("--wordsOnly", "Only output the words not found in the dictionaries.").hideHelp()).option("-u, --unique", "Only output the first instance of a word not found in the dictionaries.").option("-e, --exclude <glob>", "Exclude files matching the glob pattern. This option can be used multiple times to add multiple globs. ", collect$1).option("--file-list <path or stdin>", "Specify a list of files to be spell checked. The list is filtered against the glob file patterns. Note: the format is 1 file path per line.", collect$1).option("--file [file...]", "Specify files to spell check. They are filtered by the [globs...].", collect$1).addOption(crOpt("--files [file...]", "Alias of \"--file\". Files to spell check.", collect$1).hideHelp()).option("--no-issues", "Do not show the spelling errors.").option("--no-progress", "Turn off progress messages").option("--no-summary", "Turn off summary message in console.").option("-s, --silent", "Silent mode, suppress error messages.").option("--no-exit-code", "Do not return an exit code if issues are found.").addOption(crOpt("--quiet", "Only show spelling issues or errors.").implies({
469
358
  summary: false,
470
359
  progress: false
471
- })).option("--fail-fast", "Exit after first file with an issue or error.").addOption(crOpt("--no-fail-fast", "Process all files even if there is an error.").hideHelp()).option("--continue-on-error", "Continue processing files even if there is a configuration error.").option("-r, --root <root folder>", "Root directory, defaults to current directory.").addOption(crOpt("--relative", "Issues are displayed relative to the root.").default(true).hideHelp()).option("--no-relative", "Issues are displayed with absolute path instead of relative to the root.").option("--show-context", "Show the surrounding text around an issue.").option("--show-suggestions", "Show spelling suggestions.").addOption(crOpt("--no-show-suggestions", "Do not show spelling suggestions or fixes.").default(void 0)).addOption(crOpt("--must-find-files", "Error if no files are found.").default(true).hideHelp()).option("--no-must-find-files", "Do not error if no files are found.").addOption(crOpt("--legacy", "Legacy output").hideHelp()).addOption(crOpt("--local <local>", "Deprecated -- Use: --locale").hideHelp()).option("--cache", "Use cache to only check changed files.").option("--no-cache", "Do not use cache.").option("--cache-reset", "Reset the cache file.").addOption(crOpt("--cache-strategy <strategy>", "Strategy to use for detecting changed files.").choices(["content", "metadata"]).default("content")).option("--cache-location <path>", `Path to the cache file or directory. (default: "${DEFAULT_CACHE_LOCATION}")`).option("--dot", "Include files and directories starting with `.` (period) when matching globs.").option("--gitignore", "Ignore files matching glob patterns found in .gitignore files.").option("--no-gitignore", "Do NOT use .gitignore files.").option("--gitignore-root <path>", "Prevent searching for .gitignore files past root.", collect).option("--validate-directives", "Validate in-document CSpell directives.").addOption(crOpt("--no-validate-directives", "Do not validate in-document CSpell directives.").hideHelp()).option("--max-file-size <size>", "Prevent checking large files. i.e 1MB, 50KB, 1GB").addOption(crOpt("--color", "Force color.").default(void 0)).addOption(crOpt("--no-color", "Turn off color.").default(void 0)).addOption(crOpt("--default-configuration", "Load the default configuration and dictionaries.").hideHelp()).addOption(crOpt("--no-default-configuration", "Do not load the default configuration and dictionaries.")).option("--dictionary <name>", "Enable a dictionary by name.", collect).option("--disable-dictionary <name>", "Disable a dictionary by name.", collect).option("--reporter <module|path>", "Specify one or more reporters to use.", collect).addOption(crOpt("--report <level>", "Set how unknown words are reported").choices(ReportChoicesAll)).addOption(crOpt("--skip-validation", "Collect and process documents, but do not spell check.").implies({ cache: false }).hideHelp()).addOption(crOpt("--issues-summary-report", "Output a summary of issues found.").hideHelp()).addOption(crOpt("--show-perf-summary", "Output a performance summary report.").hideHelp()).option("--issue-template [template]", "Use a custom issue template. See --help --issue-template for details.").addOption(crOpt("--debug", "Output information useful for debugging cspell.json files.").hideHelp()).usage(usage).addHelpText("after", augmentCommandHelp).arguments("[globs...]").action(action);
360
+ })).option("--fail-fast", "Exit after first file with an issue or error.").addOption(crOpt("--no-fail-fast", "Process all files even if there is an error.").hideHelp()).option("--continue-on-error", "Continue processing files even if there is a configuration error.").option("-r, --root <root folder>", "Root directory, defaults to current directory.").addOption(crOpt("--relative", "Issues are displayed relative to the root.").default(true).hideHelp()).option("--no-relative", "Issues are displayed with absolute path instead of relative to the root.").option("--show-context", "Show the surrounding text around an issue.").option("--show-suggestions", "Show spelling suggestions.").addOption(crOpt("--no-show-suggestions", "Do not show spelling suggestions or fixes.").default(void 0)).addOption(crOpt("--must-find-files", "Error if no files are found.").default(true).hideHelp()).option("--no-must-find-files", "Do not error if no files are found.").addOption(crOpt("--legacy", "Legacy output").hideHelp()).addOption(crOpt("--local <local>", "Deprecated -- Use: --locale").hideHelp()).option("--cache", "Use cache to only check changed files.").option("--no-cache", "Do not use cache.").option("--cache-reset", "Reset the cache file.").addOption(crOpt("--cache-strategy <strategy>", "Strategy to use for detecting changed files.").choices(["content", "metadata"]).default("content")).option("--cache-location <path>", `Path to the cache file or directory. (default: "${DEFAULT_CACHE_LOCATION}")`).option("--dot", "Include files and directories starting with `.` (period) when matching globs.").option("--gitignore", "Ignore files matching glob patterns found in .gitignore files.").option("--no-gitignore", "Do NOT use .gitignore files.").option("--gitignore-root <path>", "Prevent searching for .gitignore files past root.", collect$1).option("--validate-directives", "Validate in-document CSpell directives.").addOption(crOpt("--no-validate-directives", "Do not validate in-document CSpell directives.").hideHelp()).option("--max-file-size <size>", "Prevent checking large files. i.e 1MB, 50KB, 1GB").addOption(crOpt("--color", "Force color.").default(void 0)).addOption(crOpt("--no-color", "Turn off color.").default(void 0)).addOption(crOpt("--default-configuration", "Load the default configuration and dictionaries.").hideHelp()).addOption(crOpt("--no-default-configuration", "Do not load the default configuration and dictionaries.")).option("--dictionary <name>", "Enable a dictionary by name.", collect$1).option("--disable-dictionary <name>", "Disable a dictionary by name.", collect$1).option("--reporter <module|path>", "Specify one or more reporters to use.", collect$1).addOption(crOpt("--report <level>", "Set how unknown words are reported").choices(ReportChoicesAll)).addOption(crOpt("--skip-validation", "Collect and process documents, but do not spell check.").implies({ cache: false }).hideHelp()).addOption(crOpt("--issues-summary-report", "Output a summary of issues found.").hideHelp()).addOption(crOpt("--show-perf-summary", "Output a performance summary report.").hideHelp()).option("--issue-template [template]", "Use a custom issue template. See --help --issue-template for details.").addOption(crOpt("--debug", "Output information useful for debugging cspell.json files.").hideHelp()).usage(usage).addHelpText("after", augmentCommandHelp).arguments("[globs...]").action(action);
472
361
  return spellCheckCommand;
473
362
  }
474
363
  async function action(fileGlobs, cliOptions) {
@@ -617,7 +506,7 @@ function formatWordSingle(s) {
617
506
 
618
507
  //#endregion
619
508
  //#region src/commandSuggestion.ts
620
- function collect$1(value, previous) {
509
+ function collect(value, previous) {
621
510
  value = value.replace(/^=/, "");
622
511
  if (!previous) return [value];
623
512
  return [...previous, value];
@@ -630,7 +519,7 @@ function asNumber(value, prev) {
630
519
  }
631
520
  function commandSuggestion(prog) {
632
521
  const suggestionCommand = prog.command("suggestions");
633
- suggestionCommand.aliases(["sug", "suggest"]).description("Spelling Suggestions for words.").option("-c, --config <cspell.json>", "Configuration file to use. By default cspell looks for cspell.json in the current directory.").option("--locale <locale>", "Set language locales. i.e. \"en,fr\" for English and French, or \"en-GB\" for British English.").option("--language-id <language>", "Use programming language. i.e. \"php\" or \"scala\".").addOption(new Option("--languageId <language>", "Use programming language. i.e. \"php\" or \"scala\".").hideHelp()).option("-s, --no-strict", "Ignore case and accents when searching for words.").option("--ignore-case", "Alias of --no-strict.").option("--num-changes <number>", "Number of changes allowed to a word", asNumber, 4).option("--num-suggestions <number>", "Number of suggestions", asNumber, 8).option("--no-include-ties", "Force the number of suggested to be limited, by not including suggestions that have the same edit cost.").option("--stdin", "Use stdin for input.").addOption(new Option("--repl", "REPL interface for looking up suggestions.")).option("-v, --verbose", "Show detailed output.", count, 0).option("-d, --dictionary <dictionary name>", "Use the dictionary specified. Only dictionaries specified will be used.", collect$1).option("--dictionaries <dictionary names...>", "Use the dictionaries specified. Only dictionaries specified will be used.").option("--no-color", "Turn off color.").option("--color", "Force color").arguments("[words...]").action(async (words, options) => {
522
+ suggestionCommand.aliases(["sug", "suggest"]).description("Spelling Suggestions for words.").option("-c, --config <cspell.json>", "Configuration file to use. By default cspell looks for cspell.json in the current directory.").option("--locale <locale>", "Set language locales. i.e. \"en,fr\" for English and French, or \"en-GB\" for British English.").option("--language-id <language>", "Use programming language. i.e. \"php\" or \"scala\".").addOption(new Option("--languageId <language>", "Use programming language. i.e. \"php\" or \"scala\".").hideHelp()).option("-s, --no-strict", "Ignore case and accents when searching for words.").option("--ignore-case", "Alias of --no-strict.").option("--num-changes <number>", "Number of changes allowed to a word", asNumber, 4).option("--num-suggestions <number>", "Number of suggestions", asNumber, 8).option("--no-include-ties", "Force the number of suggested to be limited, by not including suggestions that have the same edit cost.").option("--stdin", "Use stdin for input.").addOption(new Option("--repl", "REPL interface for looking up suggestions.")).option("-v, --verbose", "Show detailed output.", count, 0).option("-d, --dictionary <dictionary name>", "Use the dictionary specified. Only dictionaries specified will be used.", collect).option("--dictionaries <dictionary names...>", "Use the dictionaries specified. Only dictionaries specified will be used.").option("--no-color", "Turn off color.").option("--color", "Force color").arguments("[words...]").action(async (words, options) => {
634
523
  parseApplicationFeatureFlags(options.flag);
635
524
  options.useStdin = options.stdin;
636
525
  options.dictionaries = mergeArrays(options.dictionaries, options.dictionary);
@@ -732,7 +621,7 @@ function colorize(fn) {
732
621
  //#endregion
733
622
  //#region src/commandTrace.ts
734
623
  function commandTrace(prog) {
735
- return prog.command("trace").description(`Trace words -- Search for words in the configuration and dictionaries.`).option("-c, --config <cspell.json>", "Configuration file to use. By default cspell looks for cspell.json in the current directory.").option("--locale <locale>", "Set language locales. i.e. \"en,fr\" for English and French, or \"en-GB\" for British English.").option("--language-id <language>", "Use programming language. i.e. \"php\" or \"scala\".").addOption(new Option("--languageId <language>", "Use programming language. i.e. \"php\" or \"scala\".").hideHelp()).option("--allow-compound-words", "Turn on allowCompoundWords").addOption(new Option("--allowCompoundWords", "Turn on allowCompoundWords.").hideHelp()).option("--no-allow-compound-words", "Turn off allowCompoundWords").option("--ignore-case", "Ignore case and accents when searching for words.").option("--no-ignore-case", "Do not ignore case and accents when searching for words.").option("--dictionary <name>", "Enable a dictionary by name. Can be used multiple times.", collect).addOption(new Option("--dictionary-path <format>", "Configure how to display the dictionary path.").choices([
624
+ return prog.command("trace").description(`Trace words -- Search for words in the configuration and dictionaries.`).option("-c, --config <cspell.json>", "Configuration file to use. By default cspell looks for cspell.json in the current directory.").option("--locale <locale>", "Set language locales. i.e. \"en,fr\" for English and French, or \"en-GB\" for British English.").option("--language-id <language>", "Use programming language. i.e. \"php\" or \"scala\".").addOption(new Option("--languageId <language>", "Use programming language. i.e. \"php\" or \"scala\".").hideHelp()).option("--allow-compound-words", "Turn on allowCompoundWords").addOption(new Option("--allowCompoundWords", "Turn on allowCompoundWords.").hideHelp()).option("--no-allow-compound-words", "Turn off allowCompoundWords").option("--ignore-case", "Ignore case and accents when searching for words.").option("--no-ignore-case", "Do not ignore case and accents when searching for words.").option("--dictionary <name>", "Enable a dictionary by name. Can be used multiple times.", collect$1).addOption(new Option("--dictionary-path <format>", "Configure how to display the dictionary path.").choices([
736
625
  "hide",
737
626
  "short",
738
627
  "long",
@@ -789,7 +678,7 @@ function groupBy(items, key) {
789
678
  //#endregion
790
679
  //#region src/globalOptions.ts
791
680
  function addGlobalOptionsToAction(command) {
792
- command = command.addOption(new Option("-f,--flag <flag:value>", "Declare an execution flag value").hideHelp().argParser(collect));
681
+ command = command.addOption(new Option("-f,--flag <flag:value>", "Declare an execution flag value").hideHelp().argParser(collect$1));
793
682
  return command;
794
683
  }
795
684
  function addGlobalOptionsAndHooks(command) {