@cspell/cspell-types 6.20.0 → 6.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -904,7 +904,7 @@
904
904
  "type": "number"
905
905
  },
906
906
  "maxNumberOfProblems": {
907
- "default": 100,
907
+ "default": 10000,
908
908
  "description": "The maximum number of problems to report in a file.",
909
909
  "type": "number"
910
910
  },
@@ -1105,14 +1105,23 @@
1105
1105
  },
1106
1106
  "type": "array"
1107
1107
  },
1108
+ "ReporterModuleName": {
1109
+ "description": "The module or path to the the reporter to load.",
1110
+ "type": "string"
1111
+ },
1112
+ "ReporterOptions": {
1113
+ "$ref": "#/definitions/Serializable",
1114
+ "description": "Options to send to the reporter. These are defined by the reporter."
1115
+ },
1108
1116
  "ReporterSettings": {
1109
1117
  "anyOf": [
1110
1118
  {
1111
- "type": "string"
1119
+ "$ref": "#/definitions/ReporterModuleName"
1112
1120
  },
1113
1121
  {
1114
1122
  "items": {
1115
- "type": "string"
1123
+ "$ref": "#/definitions/ReporterModuleName",
1124
+ "title": "name"
1116
1125
  },
1117
1126
  "maxItems": 1,
1118
1127
  "minItems": 1,
@@ -1121,10 +1130,12 @@
1121
1130
  {
1122
1131
  "items": [
1123
1132
  {
1124
- "type": "string"
1133
+ "$ref": "#/definitions/ReporterModuleName",
1134
+ "title": "name"
1125
1135
  },
1126
1136
  {
1127
- "$ref": "#/definitions/Serializable"
1137
+ "$ref": "#/definitions/ReporterOptions",
1138
+ "title": "options"
1128
1139
  }
1129
1140
  ],
1130
1141
  "maxItems": 2,
@@ -1132,7 +1143,7 @@
1132
1143
  "type": "array"
1133
1144
  }
1134
1145
  ],
1135
- "description": "Reporter name or reporter name + reporter config."
1146
+ "description": "Declare a reporter to use.\n\n`default` - is a special name for the default cli reporter.\n\nExamples:\n- `\"default\"` - to use the default reporter\n- `\"@cspell/cspell-json-reporter\"` - use the cspell JSON reporter.\n- `[\"@cspell/cspell-json-reporter\", { \"outFile\": \"out.json\" }]`"
1136
1147
  },
1137
1148
  "Serializable": {
1138
1149
  "anyOf": [
@@ -1373,7 +1384,7 @@
1373
1384
  "type": "number"
1374
1385
  },
1375
1386
  "maxNumberOfProblems": {
1376
- "default": 100,
1387
+ "default": 10000,
1377
1388
  "description": "The maximum number of problems to report in a file.",
1378
1389
  "type": "number"
1379
1390
  },
@@ -1434,7 +1445,10 @@
1434
1445
  "type": "boolean"
1435
1446
  },
1436
1447
  "reporters": {
1437
- "description": "Custom reporters configuration.",
1448
+ "default": [
1449
+ "default"
1450
+ ],
1451
+ "description": "Define which reports to use. `default` - is a special name for the default cli reporter.\n\nExamples:\n- `[\"default\"]` - to use the default reporter\n- `[\"@cspell/cspell-json-reporter\"]` - use the cspell JSON reporter.\n- `[[\"@cspell/cspell-json-reporter\", { \"outFile\": \"out.json\" }]]`\n- `[ \"default\", [\"@cspell/cspell-json-reporter\", { \"outFile\": \"out.json\" }]]` - Use both the default reporter and the cspell-json-reporter.",
1438
1452
  "items": {
1439
1453
  "$ref": "#/definitions/ReporterSettings"
1440
1454
  },
@@ -90,14 +90,59 @@ export interface RunResult {
90
90
  }
91
91
  export type ResultEmitter = (result: RunResult) => void | Promise<void>;
92
92
  export interface CSpellReporter {
93
- issue: SpellingErrorEmitter;
94
- info: MessageEmitter;
95
- debug: DebugEmitter;
96
- error: ErrorEmitter;
97
- progress: ProgressEmitter;
98
- result: ResultEmitter;
93
+ issue?: SpellingErrorEmitter;
94
+ info?: MessageEmitter;
95
+ debug?: DebugEmitter;
96
+ error?: ErrorEmitter;
97
+ progress?: ProgressEmitter;
98
+ result?: ResultEmitter;
99
+ }
100
+ export interface ReporterConfigurationBase {
101
+ /**
102
+ * The maximum number of problems to report in a file.
103
+ *
104
+ * @default 10000
105
+ */
106
+ maxNumberOfProblems?: number;
107
+ /**
108
+ * The maximum number of times the same word can be flagged as an error in a file.
109
+ *
110
+ * @default 5
111
+ */
112
+ maxDuplicateProblems?: number;
113
+ /**
114
+ * The minimum length of a word before checking it against a dictionary.
115
+ *
116
+ * @default 4
117
+ */
118
+ minWordLength?: number;
119
+ }
120
+ interface ReporterCommandLineOptions {
121
+ /**
122
+ * Display verbose information
123
+ */
124
+ verbose?: boolean;
125
+ /**
126
+ * Show extensive output.
127
+ */
128
+ debug?: boolean;
129
+ /**
130
+ * Only report the words, no line numbers or file names.
131
+ */
132
+ wordsOnly?: boolean;
133
+ /**
134
+ * unique errors per file only.
135
+ */
136
+ unique?: boolean;
137
+ /**
138
+ * root directory, defaults to `cwd`
139
+ */
140
+ root?: string;
141
+ }
142
+ export interface ReporterConfiguration extends ReporterCommandLineOptions, ReporterConfigurationBase {
99
143
  }
100
144
  export interface CSpellReporterModule {
101
- getReporter: (settings: unknown) => CSpellReporter;
145
+ getReporter: (settings: unknown, config: ReporterConfiguration) => CSpellReporter;
102
146
  }
147
+ export {};
103
148
  //# sourceMappingURL=CSpellReporter.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { ReporterConfigurationBase } from './CSpellReporter.js';
1
2
  import type { DictionaryDefinition, DictionaryReference } from './DictionaryDefinition.js';
2
3
  import type { Features } from './features.js';
3
4
  import type { Parser, ParserName } from './Parser/index.js';
@@ -94,7 +95,16 @@ export interface FileSettings extends ExtendableSettings, CommandLineSettings {
94
95
  */
95
96
  readonly?: boolean;
96
97
  /**
97
- * Custom reporters configuration.
98
+ * Define which reports to use.
99
+ * `default` - is a special name for the default cli reporter.
100
+ *
101
+ * Examples:
102
+ * - `["default"]` - to use the default reporter
103
+ * - `["@cspell/cspell-json-reporter"]` - use the cspell JSON reporter.
104
+ * - `[["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]`
105
+ * - `[ "default", ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]` - Use both the default reporter and the cspell-json-reporter.
106
+ *
107
+ * @default ["default"]
98
108
  */
99
109
  reporters?: ReporterSettings[];
100
110
  /**
@@ -196,25 +206,7 @@ export interface Settings extends ReportingConfiguration, BaseSetting, PnPSettin
196
206
  */
197
207
  loadDefaultConfiguration?: boolean;
198
208
  }
199
- export interface ReportingConfiguration extends SuggestionsConfiguration {
200
- /**
201
- * The maximum number of problems to report in a file.
202
- *
203
- * @default 100
204
- */
205
- maxNumberOfProblems?: number;
206
- /**
207
- * The maximum number of times the same word can be flagged as an error in a file.
208
- *
209
- * @default 5
210
- */
211
- maxDuplicateProblems?: number;
212
- /**
213
- * The minimum length of a word before checking it against a dictionary.
214
- *
215
- * @default 4
216
- */
217
- minWordLength?: number;
209
+ export interface ReportingConfiguration extends ReporterConfigurationBase, SuggestionsConfiguration {
218
210
  }
219
211
  export interface SuggestionsConfiguration {
220
212
  /**
@@ -637,9 +629,24 @@ interface BaseSource {
637
629
  fileSource?: CSpellSettings | undefined;
638
630
  }
639
631
  /**
640
- * Reporter name or reporter name + reporter config.
632
+ * The module or path to the the reporter to load.
633
+ */
634
+ export type ReporterModuleName = string;
635
+ /**
636
+ * Options to send to the reporter. These are defined by the reporter.
637
+ */
638
+ export type ReporterOptions = Serializable;
639
+ /**
640
+ * Declare a reporter to use.
641
+ *
642
+ * `default` - is a special name for the default cli reporter.
643
+ *
644
+ * Examples:
645
+ * - `"default"` - to use the default reporter
646
+ * - `"@cspell/cspell-json-reporter"` - use the cspell JSON reporter.
647
+ * - `["@cspell/cspell-json-reporter", { "outFile": "out.json" }]`
641
648
  */
642
- export type ReporterSettings = string | [string] | [string, Serializable];
649
+ export type ReporterSettings = ReporterModuleName | [name: ReporterModuleName] | [name: ReporterModuleName, options: ReporterOptions];
643
650
  /**
644
651
  * Experimental Configuration / Options
645
652
  *
@@ -90,14 +90,59 @@ export interface RunResult {
90
90
  }
91
91
  export type ResultEmitter = (result: RunResult) => void | Promise<void>;
92
92
  export interface CSpellReporter {
93
- issue: SpellingErrorEmitter;
94
- info: MessageEmitter;
95
- debug: DebugEmitter;
96
- error: ErrorEmitter;
97
- progress: ProgressEmitter;
98
- result: ResultEmitter;
93
+ issue?: SpellingErrorEmitter;
94
+ info?: MessageEmitter;
95
+ debug?: DebugEmitter;
96
+ error?: ErrorEmitter;
97
+ progress?: ProgressEmitter;
98
+ result?: ResultEmitter;
99
+ }
100
+ export interface ReporterConfigurationBase {
101
+ /**
102
+ * The maximum number of problems to report in a file.
103
+ *
104
+ * @default 10000
105
+ */
106
+ maxNumberOfProblems?: number;
107
+ /**
108
+ * The maximum number of times the same word can be flagged as an error in a file.
109
+ *
110
+ * @default 5
111
+ */
112
+ maxDuplicateProblems?: number;
113
+ /**
114
+ * The minimum length of a word before checking it against a dictionary.
115
+ *
116
+ * @default 4
117
+ */
118
+ minWordLength?: number;
119
+ }
120
+ interface ReporterCommandLineOptions {
121
+ /**
122
+ * Display verbose information
123
+ */
124
+ verbose?: boolean;
125
+ /**
126
+ * Show extensive output.
127
+ */
128
+ debug?: boolean;
129
+ /**
130
+ * Only report the words, no line numbers or file names.
131
+ */
132
+ wordsOnly?: boolean;
133
+ /**
134
+ * unique errors per file only.
135
+ */
136
+ unique?: boolean;
137
+ /**
138
+ * root directory, defaults to `cwd`
139
+ */
140
+ root?: string;
141
+ }
142
+ export interface ReporterConfiguration extends ReporterCommandLineOptions, ReporterConfigurationBase {
99
143
  }
100
144
  export interface CSpellReporterModule {
101
- getReporter: (settings: unknown) => CSpellReporter;
145
+ getReporter: (settings: unknown, config: ReporterConfiguration) => CSpellReporter;
102
146
  }
147
+ export {};
103
148
  //# sourceMappingURL=CSpellReporter.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { ReporterConfigurationBase } from './CSpellReporter.js';
1
2
  import type { DictionaryDefinition, DictionaryReference } from './DictionaryDefinition.js';
2
3
  import type { Features } from './features.js';
3
4
  import type { Parser, ParserName } from './Parser/index.js';
@@ -94,7 +95,16 @@ export interface FileSettings extends ExtendableSettings, CommandLineSettings {
94
95
  */
95
96
  readonly?: boolean;
96
97
  /**
97
- * Custom reporters configuration.
98
+ * Define which reports to use.
99
+ * `default` - is a special name for the default cli reporter.
100
+ *
101
+ * Examples:
102
+ * - `["default"]` - to use the default reporter
103
+ * - `["@cspell/cspell-json-reporter"]` - use the cspell JSON reporter.
104
+ * - `[["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]`
105
+ * - `[ "default", ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]` - Use both the default reporter and the cspell-json-reporter.
106
+ *
107
+ * @default ["default"]
98
108
  */
99
109
  reporters?: ReporterSettings[];
100
110
  /**
@@ -196,25 +206,7 @@ export interface Settings extends ReportingConfiguration, BaseSetting, PnPSettin
196
206
  */
197
207
  loadDefaultConfiguration?: boolean;
198
208
  }
199
- export interface ReportingConfiguration extends SuggestionsConfiguration {
200
- /**
201
- * The maximum number of problems to report in a file.
202
- *
203
- * @default 100
204
- */
205
- maxNumberOfProblems?: number;
206
- /**
207
- * The maximum number of times the same word can be flagged as an error in a file.
208
- *
209
- * @default 5
210
- */
211
- maxDuplicateProblems?: number;
212
- /**
213
- * The minimum length of a word before checking it against a dictionary.
214
- *
215
- * @default 4
216
- */
217
- minWordLength?: number;
209
+ export interface ReportingConfiguration extends ReporterConfigurationBase, SuggestionsConfiguration {
218
210
  }
219
211
  export interface SuggestionsConfiguration {
220
212
  /**
@@ -637,9 +629,24 @@ interface BaseSource {
637
629
  fileSource?: CSpellSettings | undefined;
638
630
  }
639
631
  /**
640
- * Reporter name or reporter name + reporter config.
632
+ * The module or path to the the reporter to load.
633
+ */
634
+ export type ReporterModuleName = string;
635
+ /**
636
+ * Options to send to the reporter. These are defined by the reporter.
637
+ */
638
+ export type ReporterOptions = Serializable;
639
+ /**
640
+ * Declare a reporter to use.
641
+ *
642
+ * `default` - is a special name for the default cli reporter.
643
+ *
644
+ * Examples:
645
+ * - `"default"` - to use the default reporter
646
+ * - `"@cspell/cspell-json-reporter"` - use the cspell JSON reporter.
647
+ * - `["@cspell/cspell-json-reporter", { "outFile": "out.json" }]`
641
648
  */
642
- export type ReporterSettings = string | [string] | [string, Serializable];
649
+ export type ReporterSettings = ReporterModuleName | [name: ReporterModuleName] | [name: ReporterModuleName, options: ReporterOptions];
643
650
  /**
644
651
  * Experimental Configuration / Options
645
652
  *
@@ -1,6 +1,6 @@
1
1
  export type { CSpellUserSettingsFields } from './configFields.js';
2
2
  export { ConfigFields } from './configFields.js';
3
- export type { CSpellReporter, CSpellReporterModule, DebugEmitter, ErrorEmitter, ErrorLike, Issue, MessageEmitter, MessageType, MessageTypeLookup, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, ResultEmitter, RunResult, SpellingErrorEmitter, } from './CSpellReporter.js';
3
+ export type { CSpellReporter, CSpellReporterModule, DebugEmitter, ErrorEmitter, ErrorLike, Issue, MessageEmitter, MessageType, MessageTypeLookup, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, ReporterConfiguration, ResultEmitter, RunResult, SpellingErrorEmitter, } from './CSpellReporter.js';
4
4
  export { IssueType, MessageTypes } from './CSpellReporter.js';
5
5
  export type { AdvancedCSpellSettings, AdvancedCSpellSettingsWithSourceTrace, BaseSetting, CacheFormat, CacheSettings, CacheStrategy, CommandLineSettings, CSpellPackageSettings, CSpellSettings, CSpellSettingsWithSourceTrace, CSpellUserSettings, CSpellUserSettingsWithComments, ExperimentalBaseSettings, ExperimentalFileSettings, ExtendableSettings, FileSettings, FileSource, FsPath, FSPathResolvable, Glob, GlobDef, ImportFileRef, InMemorySource, LanguageId, LanguageIdMultiple, LanguageIdMultipleNeg, LanguageIdSingle, LanguageSetting, LanguageSettingFilterFields, LanguageSettingFilterFieldsDeprecated, LanguageSettingFilterFieldsPreferred, LegacySettings, LocaleId, LocalId, MergeSource, OverrideFilterFields, OverrideSettings, Pattern, PatternId, PatternRef, Plugin, PnPSettings, PredefinedPatterns, RegExpPatternDefinition, RegExpPatternList, ReporterSettings, ReportingConfiguration, Settings, SimpleGlob, Source, SuggestionsConfiguration, TrustLevel, Version, VersionLatest, VersionLegacy, WorkspaceTrustSettings, } from './CSpellSettingsDef.js';
6
6
  export type { CustomDictionaryPath, CustomDictionaryScope, DictionaryDefinition, DictionaryDefinitionAlternate, DictionaryDefinitionAugmented, DictionaryDefinitionBase, DictionaryDefinitionCustom, DictionaryDefinitionLegacy, DictionaryDefinitionPreferred, DictionaryFileTypes, DictionaryId, DictionaryNegRef, DictionaryPath, DictionaryRef, DictionaryReference, ReplaceEntry, ReplaceMap, } from './DictionaryDefinition.js';
@@ -1,6 +1,6 @@
1
1
  export type { CSpellUserSettingsFields } from './configFields.js';
2
2
  export { ConfigFields } from './configFields.js';
3
- export type { CSpellReporter, CSpellReporterModule, DebugEmitter, ErrorEmitter, ErrorLike, Issue, MessageEmitter, MessageType, MessageTypeLookup, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, ResultEmitter, RunResult, SpellingErrorEmitter, } from './CSpellReporter.js';
3
+ export type { CSpellReporter, CSpellReporterModule, DebugEmitter, ErrorEmitter, ErrorLike, Issue, MessageEmitter, MessageType, MessageTypeLookup, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, ReporterConfiguration, ResultEmitter, RunResult, SpellingErrorEmitter, } from './CSpellReporter.js';
4
4
  export { IssueType, MessageTypes } from './CSpellReporter.js';
5
5
  export type { AdvancedCSpellSettings, AdvancedCSpellSettingsWithSourceTrace, BaseSetting, CacheFormat, CacheSettings, CacheStrategy, CommandLineSettings, CSpellPackageSettings, CSpellSettings, CSpellSettingsWithSourceTrace, CSpellUserSettings, CSpellUserSettingsWithComments, ExperimentalBaseSettings, ExperimentalFileSettings, ExtendableSettings, FileSettings, FileSource, FsPath, FSPathResolvable, Glob, GlobDef, ImportFileRef, InMemorySource, LanguageId, LanguageIdMultiple, LanguageIdMultipleNeg, LanguageIdSingle, LanguageSetting, LanguageSettingFilterFields, LanguageSettingFilterFieldsDeprecated, LanguageSettingFilterFieldsPreferred, LegacySettings, LocaleId, LocalId, MergeSource, OverrideFilterFields, OverrideSettings, Pattern, PatternId, PatternRef, Plugin, PnPSettings, PredefinedPatterns, RegExpPatternDefinition, RegExpPatternList, ReporterSettings, ReportingConfiguration, Settings, SimpleGlob, Source, SuggestionsConfiguration, TrustLevel, Version, VersionLatest, VersionLegacy, WorkspaceTrustSettings, } from './CSpellSettingsDef.js';
6
6
  export type { CustomDictionaryPath, CustomDictionaryScope, DictionaryDefinition, DictionaryDefinitionAlternate, DictionaryDefinitionAugmented, DictionaryDefinitionBase, DictionaryDefinitionCustom, DictionaryDefinitionLegacy, DictionaryDefinitionPreferred, DictionaryFileTypes, DictionaryId, DictionaryNegRef, DictionaryPath, DictionaryRef, DictionaryReference, ReplaceEntry, ReplaceMap, } from './DictionaryDefinition.js';
@@ -90,14 +90,59 @@ export interface RunResult {
90
90
  }
91
91
  export type ResultEmitter = (result: RunResult) => void | Promise<void>;
92
92
  export interface CSpellReporter {
93
- issue: SpellingErrorEmitter;
94
- info: MessageEmitter;
95
- debug: DebugEmitter;
96
- error: ErrorEmitter;
97
- progress: ProgressEmitter;
98
- result: ResultEmitter;
93
+ issue?: SpellingErrorEmitter;
94
+ info?: MessageEmitter;
95
+ debug?: DebugEmitter;
96
+ error?: ErrorEmitter;
97
+ progress?: ProgressEmitter;
98
+ result?: ResultEmitter;
99
+ }
100
+ export interface ReporterConfigurationBase {
101
+ /**
102
+ * The maximum number of problems to report in a file.
103
+ *
104
+ * @default 10000
105
+ */
106
+ maxNumberOfProblems?: number;
107
+ /**
108
+ * The maximum number of times the same word can be flagged as an error in a file.
109
+ *
110
+ * @default 5
111
+ */
112
+ maxDuplicateProblems?: number;
113
+ /**
114
+ * The minimum length of a word before checking it against a dictionary.
115
+ *
116
+ * @default 4
117
+ */
118
+ minWordLength?: number;
119
+ }
120
+ interface ReporterCommandLineOptions {
121
+ /**
122
+ * Display verbose information
123
+ */
124
+ verbose?: boolean;
125
+ /**
126
+ * Show extensive output.
127
+ */
128
+ debug?: boolean;
129
+ /**
130
+ * Only report the words, no line numbers or file names.
131
+ */
132
+ wordsOnly?: boolean;
133
+ /**
134
+ * unique errors per file only.
135
+ */
136
+ unique?: boolean;
137
+ /**
138
+ * root directory, defaults to `cwd`
139
+ */
140
+ root?: string;
141
+ }
142
+ export interface ReporterConfiguration extends ReporterCommandLineOptions, ReporterConfigurationBase {
99
143
  }
100
144
  export interface CSpellReporterModule {
101
- getReporter: (settings: unknown) => CSpellReporter;
145
+ getReporter: (settings: unknown, config: ReporterConfiguration) => CSpellReporter;
102
146
  }
147
+ export {};
103
148
  //# sourceMappingURL=CSpellReporter.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { ReporterConfigurationBase } from './CSpellReporter.js';
1
2
  import type { DictionaryDefinition, DictionaryReference } from './DictionaryDefinition.js';
2
3
  import type { Features } from './features.js';
3
4
  import type { Parser, ParserName } from './Parser/index.js';
@@ -94,7 +95,16 @@ export interface FileSettings extends ExtendableSettings, CommandLineSettings {
94
95
  */
95
96
  readonly?: boolean;
96
97
  /**
97
- * Custom reporters configuration.
98
+ * Define which reports to use.
99
+ * `default` - is a special name for the default cli reporter.
100
+ *
101
+ * Examples:
102
+ * - `["default"]` - to use the default reporter
103
+ * - `["@cspell/cspell-json-reporter"]` - use the cspell JSON reporter.
104
+ * - `[["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]`
105
+ * - `[ "default", ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]` - Use both the default reporter and the cspell-json-reporter.
106
+ *
107
+ * @default ["default"]
98
108
  */
99
109
  reporters?: ReporterSettings[];
100
110
  /**
@@ -196,25 +206,7 @@ export interface Settings extends ReportingConfiguration, BaseSetting, PnPSettin
196
206
  */
197
207
  loadDefaultConfiguration?: boolean;
198
208
  }
199
- export interface ReportingConfiguration extends SuggestionsConfiguration {
200
- /**
201
- * The maximum number of problems to report in a file.
202
- *
203
- * @default 100
204
- */
205
- maxNumberOfProblems?: number;
206
- /**
207
- * The maximum number of times the same word can be flagged as an error in a file.
208
- *
209
- * @default 5
210
- */
211
- maxDuplicateProblems?: number;
212
- /**
213
- * The minimum length of a word before checking it against a dictionary.
214
- *
215
- * @default 4
216
- */
217
- minWordLength?: number;
209
+ export interface ReportingConfiguration extends ReporterConfigurationBase, SuggestionsConfiguration {
218
210
  }
219
211
  export interface SuggestionsConfiguration {
220
212
  /**
@@ -637,9 +629,24 @@ interface BaseSource {
637
629
  fileSource?: CSpellSettings | undefined;
638
630
  }
639
631
  /**
640
- * Reporter name or reporter name + reporter config.
632
+ * The module or path to the the reporter to load.
633
+ */
634
+ export type ReporterModuleName = string;
635
+ /**
636
+ * Options to send to the reporter. These are defined by the reporter.
637
+ */
638
+ export type ReporterOptions = Serializable;
639
+ /**
640
+ * Declare a reporter to use.
641
+ *
642
+ * `default` - is a special name for the default cli reporter.
643
+ *
644
+ * Examples:
645
+ * - `"default"` - to use the default reporter
646
+ * - `"@cspell/cspell-json-reporter"` - use the cspell JSON reporter.
647
+ * - `["@cspell/cspell-json-reporter", { "outFile": "out.json" }]`
641
648
  */
642
- export type ReporterSettings = string | [string] | [string, Serializable];
649
+ export type ReporterSettings = ReporterModuleName | [name: ReporterModuleName] | [name: ReporterModuleName, options: ReporterOptions];
643
650
  /**
644
651
  * Experimental Configuration / Options
645
652
  *
@@ -1,6 +1,6 @@
1
1
  export type { CSpellUserSettingsFields } from './configFields.js';
2
2
  export { ConfigFields } from './configFields.js';
3
- export type { CSpellReporter, CSpellReporterModule, DebugEmitter, ErrorEmitter, ErrorLike, Issue, MessageEmitter, MessageType, MessageTypeLookup, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, ResultEmitter, RunResult, SpellingErrorEmitter, } from './CSpellReporter.js';
3
+ export type { CSpellReporter, CSpellReporterModule, DebugEmitter, ErrorEmitter, ErrorLike, Issue, MessageEmitter, MessageType, MessageTypeLookup, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, ReporterConfiguration, ResultEmitter, RunResult, SpellingErrorEmitter, } from './CSpellReporter.js';
4
4
  export { IssueType, MessageTypes } from './CSpellReporter.js';
5
5
  export type { AdvancedCSpellSettings, AdvancedCSpellSettingsWithSourceTrace, BaseSetting, CacheFormat, CacheSettings, CacheStrategy, CommandLineSettings, CSpellPackageSettings, CSpellSettings, CSpellSettingsWithSourceTrace, CSpellUserSettings, CSpellUserSettingsWithComments, ExperimentalBaseSettings, ExperimentalFileSettings, ExtendableSettings, FileSettings, FileSource, FsPath, FSPathResolvable, Glob, GlobDef, ImportFileRef, InMemorySource, LanguageId, LanguageIdMultiple, LanguageIdMultipleNeg, LanguageIdSingle, LanguageSetting, LanguageSettingFilterFields, LanguageSettingFilterFieldsDeprecated, LanguageSettingFilterFieldsPreferred, LegacySettings, LocaleId, LocalId, MergeSource, OverrideFilterFields, OverrideSettings, Pattern, PatternId, PatternRef, Plugin, PnPSettings, PredefinedPatterns, RegExpPatternDefinition, RegExpPatternList, ReporterSettings, ReportingConfiguration, Settings, SimpleGlob, Source, SuggestionsConfiguration, TrustLevel, Version, VersionLatest, VersionLegacy, WorkspaceTrustSettings, } from './CSpellSettingsDef.js';
6
6
  export type { CustomDictionaryPath, CustomDictionaryScope, DictionaryDefinition, DictionaryDefinitionAlternate, DictionaryDefinitionAugmented, DictionaryDefinitionBase, DictionaryDefinitionCustom, DictionaryDefinitionLegacy, DictionaryDefinitionPreferred, DictionaryFileTypes, DictionaryId, DictionaryNegRef, DictionaryPath, DictionaryRef, DictionaryReference, ReplaceEntry, ReplaceMap, } from './DictionaryDefinition.js';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "6.20.0",
6
+ "version": "6.21.0",
7
7
  "description": "Types for cspell and cspell-lib",
8
8
  "type": "module",
9
9
  "main": "./dist/cjs/index.cjs",
@@ -94,5 +94,5 @@
94
94
  "typescript": "^4.9.5",
95
95
  "vitest": "^0.28.3"
96
96
  },
97
- "gitHead": "9de0bdd5b8da54daa72ccd6c328274bd796ada33"
97
+ "gitHead": "67b37de0cbcbe62feb8fb6ec95adad1275c14caa"
98
98
  }