Skip to content

Commit

Permalink
fix: Fix some minor issues (#1562)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Aug 21, 2021
1 parent 1decfb4 commit 8512920
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 16 deletions.
17 changes: 12 additions & 5 deletions cspell.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
"type": "string"
},
"dictionaries": {
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn of the dictionary with the name `typescript`.",
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn off the dictionary with the name `typescript`.",
"items": {
"$ref": "#/definitions/DictionaryReference"
},
Expand Down Expand Up @@ -272,6 +272,13 @@
"$ref": "#/definitions/RegExpPatternList",
"description": "List of RegExp patterns or Pattern names to exclude from spell checking.\n\nExample: [\"href\"] - to exclude html href"
},
"ignoreWords": {
"description": "List of words to be ignored. An Ignored word will not show up as an error even if it is also in the `flagWords`.",
"items": {
"type": "string"
},
"type": "array"
},
"includeRegExpList": {
"$ref": "#/definitions/RegExpPatternList",
"description": "List of RegExp patterns or defined Pattern names to define the text to be included for spell checking. If includeRegExpList is defined, ONLY, text matching the included patterns will be checked."
Expand Down Expand Up @@ -372,7 +379,7 @@
"type": "string"
},
"dictionaries": {
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn of the dictionary with the name `typescript`.",
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn off the dictionary with the name `typescript`.",
"items": {
"$ref": "#/definitions/DictionaryReference"
},
Expand Down Expand Up @@ -437,7 +444,7 @@
"description": "List of RegExp patterns or Pattern names to exclude from spell checking.\n\nExample: [\"href\"] - to exclude html href"
},
"ignoreWords": {
"description": "list of words to be ignored",
"description": "List of words to be ignored. An Ignored word will not show up as an error even if it is also in the `flagWords`.",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -677,7 +684,7 @@
"type": "string"
},
"dictionaries": {
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn of the dictionary with the name `typescript`.",
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn off the dictionary with the name `typescript`.",
"items": {
"$ref": "#/definitions/DictionaryReference"
},
Expand Down Expand Up @@ -746,7 +753,7 @@
"description": "List of RegExp patterns or Pattern names to exclude from spell checking.\n\nExample: [\"href\"] - to exclude html href"
},
"ignoreWords": {
"description": "list of words to be ignored",
"description": "List of words to be ignored. An Ignored word will not show up as an error even if it is also in the `flagWords`.",
"items": {
"type": "string"
},
Expand Down
17 changes: 12 additions & 5 deletions packages/cspell-types/cspell.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
"type": "string"
},
"dictionaries": {
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn of the dictionary with the name `typescript`.",
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn off the dictionary with the name `typescript`.",
"items": {
"$ref": "#/definitions/DictionaryReference"
},
Expand Down Expand Up @@ -272,6 +272,13 @@
"$ref": "#/definitions/RegExpPatternList",
"description": "List of RegExp patterns or Pattern names to exclude from spell checking.\n\nExample: [\"href\"] - to exclude html href"
},
"ignoreWords": {
"description": "List of words to be ignored. An Ignored word will not show up as an error even if it is also in the `flagWords`.",
"items": {
"type": "string"
},
"type": "array"
},
"includeRegExpList": {
"$ref": "#/definitions/RegExpPatternList",
"description": "List of RegExp patterns or defined Pattern names to define the text to be included for spell checking. If includeRegExpList is defined, ONLY, text matching the included patterns will be checked."
Expand Down Expand Up @@ -372,7 +379,7 @@
"type": "string"
},
"dictionaries": {
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn of the dictionary with the name `typescript`.",
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn off the dictionary with the name `typescript`.",
"items": {
"$ref": "#/definitions/DictionaryReference"
},
Expand Down Expand Up @@ -437,7 +444,7 @@
"description": "List of RegExp patterns or Pattern names to exclude from spell checking.\n\nExample: [\"href\"] - to exclude html href"
},
"ignoreWords": {
"description": "list of words to be ignored",
"description": "List of words to be ignored. An Ignored word will not show up as an error even if it is also in the `flagWords`.",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -677,7 +684,7 @@
"type": "string"
},
"dictionaries": {
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn of the dictionary with the name `typescript`.",
"description": "Optional list of dictionaries to use. Each entry should match the name of the dictionary. To remove a dictionary from the list add `!` before the name. i.e. `!typescript` will turn off the dictionary with the name `typescript`.",
"items": {
"$ref": "#/definitions/DictionaryReference"
},
Expand Down Expand Up @@ -746,7 +753,7 @@
"description": "List of RegExp patterns or Pattern names to exclude from spell checking.\n\nExample: [\"href\"] - to exclude html href"
},
"ignoreWords": {
"description": "list of words to be ignored",
"description": "List of words to be ignored. An Ignored word will not show up as an error even if it is also in the `flagWords`.",
"items": {
"type": "string"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/cspell-types/src/settings/CSpellSettingsDef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ export interface Settings extends BaseSetting, PnPSettings {
*/
language?: LocaleId;

/** list of words to be ignored */
ignoreWords?: string[];

/** languageIds for the files to spell check. */
enabledLanguageIds?: LanguageIdSingle[];

Expand Down Expand Up @@ -257,6 +254,9 @@ export interface BaseSetting {
/** list of words to always be considered incorrect. */
flagWords?: string[];

/** List of words to be ignored. An Ignored word will not show up as an error even if it is also in the `flagWords`. */
ignoreWords?: string[];

/**
* True to enable compound word checking.
* @default false
Expand All @@ -276,7 +276,7 @@ export interface BaseSetting {
* Optional list of dictionaries to use.
* Each entry should match the name of the dictionary.
* To remove a dictionary from the list add `!` before the name.
* i.e. `!typescript` will turn of the dictionary with the name `typescript`.
* i.e. `!typescript` will turn off the dictionary with the name `typescript`.
*/
dictionaries?: DictionaryReference[];

Expand Down
4 changes: 2 additions & 2 deletions packages/cspell/src/traceEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ function calcFoundChar(r: TraceResult): string {
let color = chalk.dim;
color = r.found ? chalk.whiteBright : color;
color = r.forbidden ? chalk.red : color;
color = r.noSuggest ? chalk.blueBright : color;
color = r.noSuggest ? chalk.yellowBright : color;
color = errors ? chalk.red : color;

let char = '-';
char = r.found ? '*' : char;
char = r.forbidden ? '!' : char;
char = r.noSuggest ? 'N' : char;
char = r.noSuggest ? 'I' : char;
char = errors ? 'X' : char;

return color(char);
Expand Down

0 comments on commit 8512920

Please sign in to comment.