@kitschpatrol/cspell-config 5.7.0 → 5.7.2
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/bin/cli.js +1 -1
- package/package.json +4 -4
- package/readme.md +39 -3
package/bin/cli.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/cspell-config",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.2",
|
|
4
4
|
"description": "CSpell configuration for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"cspell-lib": "^9.2.1",
|
|
53
53
|
"execa": "^9.6.0",
|
|
54
54
|
"find-workspaces": "^0.3.1",
|
|
55
|
-
"fs-extra": "^11.3.
|
|
55
|
+
"fs-extra": "^11.3.2",
|
|
56
56
|
"prettier": "^3.6.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"globby": "^
|
|
60
|
-
"untildify": "^
|
|
59
|
+
"globby": "^15.0.0",
|
|
60
|
+
"untildify": "^6.0.0"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=20.19.0"
|
package/readme.md
CHANGED
|
@@ -21,7 +21,11 @@
|
|
|
21
21
|
|
|
22
22
|
## Overview
|
|
23
23
|
|
|
24
|
-
It's a shared [CSpell](https://cspell.org) config, plus a command-line tool `ksc-cspell` to perform CSpell-related project initialization and linting.
|
|
24
|
+
It's a shared [CSpell](https://cspell.org) config, plus a command-line tool `ksc-cspell` to perform CSpell-related project initialization and linting.
|
|
25
|
+
|
|
26
|
+
In addition to basic CSpell functionality, this package bundles a few extra features: It identifies "unused" words in your local CSpell configuration's ignore list that don't actually appear anywhere in your project, and it incorporates [Case Police](https://github.com/antfu/case-police) to enforce case consistency.
|
|
27
|
+
|
|
28
|
+
Note that automated fixes are handled via an ESLint integration provided in [@kitschpatrol/eslint-config](https://github.com/kitschpatrol/shared-config/tree/main/packages/eslint-config).
|
|
25
29
|
|
|
26
30
|
<!-- recommendation -->
|
|
27
31
|
|
|
@@ -91,6 +95,40 @@ pnpm exec ksc-cspell init --location package
|
|
|
91
95
|
|
|
92
96
|
(Note that this will delete the `cspell.config.js` file in your project root!)
|
|
93
97
|
|
|
98
|
+
#### Ignoring files
|
|
99
|
+
|
|
100
|
+
CSpell is configured to automatically ignore files and paths in `.gitignore` (via `"useGitignore": true`), and to ignore words inside of ` ``` ` code fences in Markdown and MDX files.
|
|
101
|
+
|
|
102
|
+
Additional ignore patterns may be added to your project's CSpell config via the `ignorePaths` key.
|
|
103
|
+
|
|
104
|
+
Ignored files are automatically excluded from Case Police checks as well.
|
|
105
|
+
|
|
106
|
+
To exclude a specific file from Case Police checks, but to still check it with CSpell, include a comment:
|
|
107
|
+
|
|
108
|
+
`// @case-police-disable`
|
|
109
|
+
|
|
110
|
+
#### Ignoring specific words
|
|
111
|
+
|
|
112
|
+
Many words are included in the bundled dictionaries used by the shared configuration.
|
|
113
|
+
|
|
114
|
+
Additional words may be added to your project's CSpell config via the `words` key.
|
|
115
|
+
|
|
116
|
+
Specific words may be ignored on a per-file basis by including a comment:
|
|
117
|
+
|
|
118
|
+
`/* spell-checker: ignore $WORD, $ANOTHER_WORD, $YET_ANOTHER_WORD*/`
|
|
119
|
+
|
|
120
|
+
Likewise to ignore certain Case Police words:
|
|
121
|
+
|
|
122
|
+
`// @case-police-ignore $WORD, $ANOTHER_WORD, $YET_ANOTHER_WORD`
|
|
123
|
+
|
|
124
|
+
#### Ignoring code
|
|
125
|
+
|
|
126
|
+
See [the CSpell documentation](https://cspell.org/docs/Configuration/document-settings).
|
|
127
|
+
|
|
128
|
+
Blocks:
|
|
129
|
+
|
|
130
|
+
`/* spell-checker:disable */ ... /* spell-checker:enable */`
|
|
131
|
+
|
|
94
132
|
#### Disabling bundled dictionaries
|
|
95
133
|
|
|
96
134
|
In additional to CSpell's default dictionary configuration, this shared configuration enables a number of dictionaries that ship with CSpell for all file types:
|
|
@@ -231,8 +269,6 @@ ksc-cspell print-config
|
|
|
231
269
|
|
|
232
270
|
This config includes a bunch of words I've happened to have needed to use. Your preferences will vary.
|
|
233
271
|
|
|
234
|
-
CSpell is configured to automatically ignore files and paths in `.gitignore` (via `"useGitignore": true`), and to ignore words inside of ` ``` ` code fences in markdown and mdx files.
|
|
235
|
-
|
|
236
272
|
As part of the `lint` command process, `@kitschpatrol/cspell-config` also runs a check to identify any words in your config file's `"words"` array that are _do not_ actually appear anywhere else in your project. This was inspired by [Zamiell's](https://github.com/Zamiell) [cspell-check-unused-words](https://github.com/complete-ts/cspell-check-unused-words) project.
|
|
237
273
|
|
|
238
274
|
<!-- license -->
|