Skip to content

Commit

Permalink
feat: Upgrade to CSpell 6.26.1 (#2521)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Feb 16, 2023
1 parent fd0425b commit 9e6a5e1
Show file tree
Hide file tree
Showing 14 changed files with 252 additions and 131 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const companyName = 'woorxs sweeetbeat';

### Enable / Disable compound words

In some programing language it is common to glue words together.
In some programming language it is common to glue words together.

```c
// cSpell:enableCompoundWords
Expand Down
9 changes: 9 additions & 0 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"/samples",
"CHANGELOG.md",
"cSpell.json",
"cspell*.{json,yaml}",
".cspell*.{json,yaml}",
"fixtures/workspaces/**",
"languageCodes.ts",
"package-lock.json",
Expand All @@ -23,6 +25,7 @@
"packages/client/samples/**",
"packages/client/server/**",
"packages/client/settingsViewer/**",
"spell-checker-config.schema.json",
"testFixtures"
],
"ignoreWords": [],
Expand All @@ -46,5 +49,11 @@
"allowCompoundWords": false
}
],
"overrides": [
{
"filename": "package.json",
"ignoreWords": ["colour", "canot"]
}
],
"useGitignore": true
}
8 changes: 7 additions & 1 deletion docs/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,11 @@
}
],
"enableFiletypes": ["ruby"],
"ignorePaths": ["_site/**"]
"ignorePaths": ["_site/**", "cspell*.{json,yaml}"],
"overrides": [
{
"filename": "**/generated-docs/configuration.md",
"ignoreWords": ["colour", "canot", "overridable", "userdata", "scminput"]
}
]
}
38 changes: 34 additions & 4 deletions docs/_includes/generated-docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ Default
| [`cSpell.customDictionaries`](#cspellcustomdictionaries) | resource | Custom Dictionaries |
| [`cSpell.dictionaries`](#cspelldictionaries) | resource | Optional list of dictionaries to use. |
| [`cSpell.dictionaryDefinitions`](#cspelldictionarydefinitions) | resource | Define additional available dictionaries. |
| [`cSpell.flagWords`](#cspellflagwords) | resource | List of words to always be considered incorrect. |
| [`cSpell.flagWords`](#cspellflagwords) | resource | List of words to always be considered incorrect. Words found in `flagWords` override `words`. |
| [`cSpell.ignoreWords`](#cspellignorewords) | resource | A list of words to be ignored by the spell checker. |
| [`cSpell.language`](#cspelllanguage) | resource | Current active spelling language. |
| [`cSpell.languageSettings`](#cspelllanguagesettings) | resource | Additional settings for individual programming languages and locales. |
| [`cSpell.noSuggestDictionaries`](#cspellnosuggestdictionaries) | resource | Optional list of dictionaries that will not be used for suggestions. Words in these dictionaries… |
| [`cSpell.userWords`](#cspelluserwords) | resource | Words to add to global dictionary -- should only be in the user config file. |
| [`cSpell.words`](#cspellwords) | resource | List of words to be always considered correct. |
| [`cSpell.words`](#cspellwords) | resource | List of words to be considered correct. |

## Definitions

Expand Down Expand Up @@ -170,7 +170,13 @@ Scope
: resource

Description
: List of words to always be considered incorrect.
: List of words to always be considered incorrect. Words found in `flagWords` override `words`.

Format of `flagWords`
- single word entry - `word`
- with suggestions - `word:suggestion` or `word->suggestion, suggestions`

Example: ```ts "flagWords": [ "color: colour", "incase: in case, encase", "canot->cannot", "cancelled->canceled" ] ```

Default
: _- none -_
Expand Down Expand Up @@ -288,7 +294,7 @@ Scope
: resource

Description
: List of words to be always considered correct.
: List of words to be considered correct.

Default
: _- none -_
Expand Down Expand Up @@ -1087,6 +1093,7 @@ Default
| [`cSpell.includeRegExpList`](#cspellincluderegexplist) | resource | List of regular expression patterns or defined pattern names to match for spell checking. |
| [`cSpell.overrides`](#cspelloverrides) | resource | Overrides are used to apply settings for specific files in your project. |
| [`cSpell.patterns`](#cspellpatterns) | resource | Defines a list of patterns that can be used with the `#cSpell.ignoreRegExpList#` and |
| [`cSpell.suggestWords`](#cspellsuggestwords) | | A list of suggested replacements for words. Suggested words provide a way to make preferred… |

## Definitions

Expand Down Expand Up @@ -1214,6 +1221,29 @@ Default

---

### `cSpell.suggestWords`

Name
: `cSpell.suggestWords`

Type
: string[]

Scope
:

Description
: A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.

Format of `suggestWords`
- Single suggestion (possible auto fix) - `word: suggestion` - `word->suggestion`
- Multiple suggestions (not auto fixable) - `word: first, second, third` - `word->first, second, third`

Default
: _- none -_

---

# Advanced

| Setting | Scope | Description |
Expand Down
50 changes: 39 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@
"description": "Glob pattern or patterns to match against."
},
"flagWords": {
"description": "List of words to always be considered incorrect.",
"description": "List of words to always be considered incorrect. Words found in `flagWords` override `words`.\n\nFormat of `flagWords`\n- single word entry - `word`\n- with suggestions - `word:suggestion` or `word->suggestion, suggestions`\n\nExample: ```ts \"flagWords\": [ \"color: colour\", \"incase: in case, encase\", \"canot->cannot\", \"cancelled->canceled\" ] ```",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -848,7 +848,7 @@
"type": "boolean"
},
"flagWords": {
"description": "List of words to always be considered incorrect.",
"description": "List of words to always be considered incorrect. Words found in `flagWords` override `words`.\n\nFormat of `flagWords`\n- single word entry - `word`\n- with suggestions - `word:suggestion` or `word->suggestion, suggestions`\n\nExample: ```ts \"flagWords\": [ \"color: colour\", \"incase: in case, encase\", \"canot->cannot\", \"cancelled->canceled\" ] ```",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -973,8 +973,15 @@
},
"type": "array"
},
"suggestWords": {
"description": "A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.\n\nFormat of `suggestWords`\n- Single suggestion (possible auto fix) - `word: suggestion` - `word->suggestion`\n- Multiple suggestions (not auto fixable) - `word: first, second, third` - `word->first, second, third`",
"items": {
"type": "string"
},
"type": "array"
},
"words": {
"description": "List of words to be always considered correct.",
"description": "List of words to be considered correct.",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -1073,6 +1080,13 @@
},
"type": "array"
},
"suggestWords": {
"description": "A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.\n\nFormat of `suggestWords`\n- Single suggestion (possible auto fix) - `word: suggestion` - `word->suggestion`\n- Multiple suggestions (not auto fixable) - `word: first, second, third` - `word->first, second, third`",
"items": {
"type": "string"
},
"type": "array"
},
"suggestionNumChanges": {
"default": 3,
"description": "The maximum number of changes allowed on a word to be considered a suggestions.\n\nFor example, appending an `s` onto `example` -> `examples` is considered 1 change.\n\nRange: between 1 and 5.",
Expand All @@ -1089,7 +1103,7 @@
"type": "boolean"
},
"words": {
"description": "List of words to be always considered correct.",
"description": "List of words to be considered correct.",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -1142,6 +1156,13 @@
"markdownDescription": "Defines a list of patterns that can be used with the `#cSpell.ignoreRegExpList#` and\n`#cSpell.includeRegExpList#` options.\n\n**Example:**\n\n```jsonc\n\"cSpell.patterns\": [\n {\n \"name\": \"comment-single-line\",\n \"pattern\": \"/#.*​/g\"\n },\n {\n \"name\": \"comment-multi-line\",\n \"pattern\": \"/(?:\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\/)/g\"\n }\n]\n```",
"scope": "resource",
"type": "array"
},
"cSpell.suggestWords": {
"description": "A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.\n\nFormat of `suggestWords`\n- Single suggestion (possible auto fix) - `word: suggestion` - `word->suggestion`\n- Multiple suggestions (not auto fixable) - `word: first, second, third` - `word->first, second, third`",
"items": {
"type": "string"
},
"type": "array"
}
},
"title": "CSpell",
Expand Down Expand Up @@ -1475,7 +1496,7 @@
"type": "array"
},
"cSpell.flagWords": {
"description": "List of words to always be considered incorrect.",
"description": "List of words to always be considered incorrect. Words found in `flagWords` override `words`.\n\nFormat of `flagWords`\n- single word entry - `word`\n- with suggestions - `word:suggestion` or `word->suggestion, suggestions`\n\nExample: ```ts \"flagWords\": [ \"color: colour\", \"incase: in case, encase\", \"canot->cannot\", \"cancelled->canceled\" ] ```",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -1621,7 +1642,7 @@
"type": "boolean"
},
"flagWords": {
"description": "List of words to always be considered incorrect.",
"description": "List of words to always be considered incorrect. Words found in `flagWords` override `words`.\n\nFormat of `flagWords`\n- single word entry - `word`\n- with suggestions - `word:suggestion` or `word->suggestion, suggestions`\n\nExample: ```ts \"flagWords\": [ \"color: colour\", \"incase: in case, encase\", \"canot->cannot\", \"cancelled->canceled\" ] ```",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -1746,8 +1767,15 @@
},
"type": "array"
},
"suggestWords": {
"description": "A list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.\n\nFormat of `suggestWords`\n- Single suggestion (possible auto fix) - `word: suggestion` - `word->suggestion`\n- Multiple suggestions (not auto fixable) - `word: first, second, third` - `word->first, second, third`",
"items": {
"type": "string"
},
"type": "array"
},
"words": {
"description": "List of words to be always considered correct.",
"description": "List of words to be considered correct.",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -1780,7 +1808,7 @@
"type": "array"
},
"cSpell.words": {
"description": "List of words to be always considered correct.",
"description": "List of words to be considered correct.",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -2515,11 +2543,11 @@
"typescript": "^4.9.5"
},
"dependencies": {
"@cspell/cspell-bundled-dicts": "^6.22.0",
"@cspell/cspell-types": "^6.22.0",
"@cspell/cspell-bundled-dicts": "^6.26.1",
"@cspell/cspell-types": "^6.26.1",
"@types/react": "^17.0.53",
"cosmiconfig": "^8.0.0",
"cspell": "^6.22.0",
"cspell": "^6.26.1",
"regexp-worker": "^2.0.1"
},
"comment-resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/_integrationTests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@cspell/cspell-types": "^6.22.0",
"@cspell/cspell-types": "^6.26.1",
"@types/chai": "^4.3.4",
"@types/glob": "^8.0.1",
"@types/mocha": "^10.0.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/_server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
}
},
"devDependencies": {
"@cspell/cspell-types": "^6.22.0",
"@cspell/cspell-types": "^6.26.1",
"@types/fs-extra": "^11.0.1",
"@types/jest": "^29.4.0",
"@types/micromatch": "^4.0.2",
"@types/node": "^18.13.0",
"common-utils": "1.0.0",
"cspell-glob": "^6.22.0",
"cspell-lib": "^6.22.0",
"cspell-glob": "^6.26.1",
"cspell-lib": "^6.26.1",
"fs-extra": "^11.1.0",
"gensequence": "^4.0.3",
"iconv-lite": "^0.6.3",
Expand All @@ -52,8 +52,8 @@
"webpack-cli": "^5.0.1"
},
"dependencies": {
"@cspell/cspell-bundled-dicts": "^6.22.0",
"cspell-gitignore": "^6.22.0"
"@cspell/cspell-bundled-dicts": "^6.26.1",
"cspell-gitignore": "^6.26.1"
},
"scripts": {
"clean": "shx rm -rf dist temp out coverage",
Expand Down
Loading

0 comments on commit 9e6a5e1

Please sign in to comment.