@kitschpatrol/cspell-config 5.6.0 → 5.7.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/bin/cli.js +2 -2
- package/dictionaries/kp-brands.txt +2 -0
- package/dictionaries/kp-eslint.txt +2 -0
- package/dictionaries/kp-misc.txt +2 -0
- package/dictionaries/kp-names.txt +4 -2
- package/dictionaries/kp-tech.txt +8 -1
- package/package.json +8 -7
- package/readme.md +53 -17
package/bin/cli.js
CHANGED
|
@@ -5138,7 +5138,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
5138
5138
|
var yargs_default = Yargs;
|
|
5139
5139
|
|
|
5140
5140
|
// ../../package.json
|
|
5141
|
-
var version = "5.
|
|
5141
|
+
var version = "5.7.1";
|
|
5142
5142
|
|
|
5143
5143
|
// ../../src/execa-utilities.ts
|
|
5144
5144
|
function isErrorExecaError(error) {
|
|
@@ -5948,7 +5948,7 @@ var commandDefinition = {
|
|
|
5948
5948
|
description: "Kitschpatrol's CSpell shared configuration tools. (Automated fixes are handled by ESLint.)",
|
|
5949
5949
|
logColor: "cyan",
|
|
5950
5950
|
logPrefix: "[CSpell]",
|
|
5951
|
-
name: "
|
|
5951
|
+
name: "ksc-cspell",
|
|
5952
5952
|
order: 6
|
|
5953
5953
|
};
|
|
5954
5954
|
|
package/dictionaries/kp-misc.txt
CHANGED
|
@@ -189,6 +189,7 @@ Bubuck
|
|
|
189
189
|
Buckminster
|
|
190
190
|
Budd
|
|
191
191
|
Buffett
|
|
192
|
+
bullrich
|
|
192
193
|
Burges
|
|
193
194
|
Burgund
|
|
194
195
|
Burndy
|
|
@@ -578,6 +579,7 @@ Hultén
|
|
|
578
579
|
Husain
|
|
579
580
|
Husted
|
|
580
581
|
Hyman
|
|
582
|
+
hyperse
|
|
581
583
|
Iberti
|
|
582
584
|
Ichiran
|
|
583
585
|
Idah
|
|
@@ -743,7 +745,9 @@ Kutnow
|
|
|
743
745
|
Kuzmin
|
|
744
746
|
Kykuit
|
|
745
747
|
Kyoko
|
|
748
|
+
L’Óreal
|
|
746
749
|
L'Rai
|
|
750
|
+
L’Rai
|
|
747
751
|
Laidlaw
|
|
748
752
|
Laika
|
|
749
753
|
Lalo
|
|
@@ -803,10 +807,8 @@ Löffler
|
|
|
803
807
|
Lohman
|
|
804
808
|
Loic
|
|
805
809
|
Loong
|
|
806
|
-
L’Óreal
|
|
807
810
|
Lovejoy
|
|
808
811
|
Lrai
|
|
809
|
-
L’Rai
|
|
810
812
|
Ludion
|
|
811
813
|
Luiz
|
|
812
814
|
Lupton
|
package/dictionaries/kp-tech.txt
CHANGED
|
@@ -66,6 +66,7 @@ cameraring
|
|
|
66
66
|
camerawheel
|
|
67
67
|
capsizecss
|
|
68
68
|
certbot
|
|
69
|
+
charuco
|
|
69
70
|
checkjs
|
|
70
71
|
cherrypy
|
|
71
72
|
chezmoi
|
|
@@ -80,6 +81,7 @@ codebooga
|
|
|
80
81
|
codellama
|
|
81
82
|
codesigning
|
|
82
83
|
Codespaces
|
|
84
|
+
codespell
|
|
83
85
|
codsen
|
|
84
86
|
Colibri
|
|
85
87
|
Collab
|
|
@@ -228,6 +230,7 @@ introstart
|
|
|
228
230
|
InvisBox
|
|
229
231
|
iosveka
|
|
230
232
|
ipynb
|
|
233
|
+
itson
|
|
231
234
|
jetblack
|
|
232
235
|
jpgs
|
|
233
236
|
jphc
|
|
@@ -245,9 +248,10 @@ keyof
|
|
|
245
248
|
Kinect
|
|
246
249
|
kinects
|
|
247
250
|
kiota
|
|
248
|
-
kpi
|
|
249
251
|
kputil
|
|
252
|
+
ksc
|
|
250
253
|
ksdiff
|
|
254
|
+
labelot
|
|
251
255
|
lanczos
|
|
252
256
|
langchain
|
|
253
257
|
latlon
|
|
@@ -399,6 +403,7 @@ openstreetmap
|
|
|
399
403
|
optionator
|
|
400
404
|
osascript
|
|
401
405
|
oscreplayer
|
|
406
|
+
osxkeychain
|
|
402
407
|
osxphotos
|
|
403
408
|
outfile
|
|
404
409
|
outro
|
|
@@ -442,6 +447,7 @@ playsinline
|
|
|
442
447
|
pngs
|
|
443
448
|
pointerupoutside
|
|
444
449
|
Polycode
|
|
450
|
+
poptab
|
|
445
451
|
poscene
|
|
446
452
|
positionals
|
|
447
453
|
Preact
|
|
@@ -512,6 +518,7 @@ smartmontools
|
|
|
512
518
|
smupgd
|
|
513
519
|
Snipster
|
|
514
520
|
softphone
|
|
521
|
+
softprops
|
|
515
522
|
speex
|
|
516
523
|
squoosh
|
|
517
524
|
srgb
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/cspell-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.1",
|
|
4
4
|
"description": "CSpell configuration for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
7
7
|
"cspell-config",
|
|
8
8
|
"cspell",
|
|
9
9
|
"cli",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"ksc",
|
|
11
|
+
"ksc-cspell"
|
|
12
12
|
],
|
|
13
13
|
"homepage": "https://github.com/kitschpatrol/shared-config/tree/main/packages/cspell-config",
|
|
14
14
|
"bugs": "https://github.com/kitschpatrol/shared-config/issues",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"main": "dist/index.js",
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"bin": {
|
|
36
|
-
"kpi-cspell": "bin/cli.js"
|
|
36
|
+
"kpi-cspell": "bin/cli.js",
|
|
37
|
+
"ksc-cspell": "bin/cli.js"
|
|
37
38
|
},
|
|
38
39
|
"files": [
|
|
39
40
|
"bin/*",
|
|
@@ -51,12 +52,12 @@
|
|
|
51
52
|
"cspell-lib": "^9.2.1",
|
|
52
53
|
"execa": "^9.6.0",
|
|
53
54
|
"find-workspaces": "^0.3.1",
|
|
54
|
-
"fs-extra": "^11.3.
|
|
55
|
+
"fs-extra": "^11.3.2",
|
|
55
56
|
"prettier": "^3.6.2"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"globby": "^
|
|
59
|
-
"untildify": "^
|
|
59
|
+
"globby": "^15.0.0",
|
|
60
|
+
"untildify": "^6.0.0"
|
|
60
61
|
},
|
|
61
62
|
"engines": {
|
|
62
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 `
|
|
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
|
|
|
@@ -29,7 +33,7 @@ It's a shared [CSpell](https://cspell.org) config, plus a command-line tool `kpi
|
|
|
29
33
|
>
|
|
30
34
|
> **You can use this package on its own, but it's recommended to use [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
|
|
31
35
|
>
|
|
32
|
-
> This package is included as a dependency in [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config), which also automatically invokes the command line functionality in this package via its `
|
|
36
|
+
> This package is included as a dependency in [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config), which also automatically invokes the command line functionality in this package via its `ksc` command
|
|
33
37
|
|
|
34
38
|
<!-- /recommendation -->
|
|
35
39
|
|
|
@@ -52,7 +56,7 @@ To use just this CSpell config in isolation:
|
|
|
52
56
|
3. Add the starter `.cspell.json` file to your project root, and add any customizations you'd like:
|
|
53
57
|
|
|
54
58
|
```sh
|
|
55
|
-
pnpm exec
|
|
59
|
+
pnpm exec ksc-cspell init
|
|
56
60
|
```
|
|
57
61
|
|
|
58
62
|
## Usage
|
|
@@ -66,7 +70,7 @@ Integrate with your `package.json` scripts as you see fit, for example:
|
|
|
66
70
|
```json
|
|
67
71
|
{
|
|
68
72
|
"scripts": {
|
|
69
|
-
"spellcheck": "
|
|
73
|
+
"spellcheck": "ksc-cspell lint"
|
|
70
74
|
}
|
|
71
75
|
}
|
|
72
76
|
```
|
|
@@ -76,7 +80,7 @@ Integrate with your `package.json` scripts as you see fit, for example:
|
|
|
76
80
|
To create a `cspell.config.js` in your project root:
|
|
77
81
|
|
|
78
82
|
```sh
|
|
79
|
-
pnpm exec
|
|
83
|
+
pnpm exec ksc-knip init
|
|
80
84
|
```
|
|
81
85
|
|
|
82
86
|
(Note that this will delete the `cspell` property in your `package.json`!)
|
|
@@ -86,11 +90,45 @@ _Or_
|
|
|
86
90
|
To create a `cspell` property in `package.json`:
|
|
87
91
|
|
|
88
92
|
```sh
|
|
89
|
-
pnpm exec
|
|
93
|
+
pnpm exec ksc-cspell init --location package
|
|
90
94
|
```
|
|
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:
|
|
@@ -150,16 +188,16 @@ In your project's root `.cspell.json`:
|
|
|
150
188
|
|
|
151
189
|
<!-- cli-help -->
|
|
152
190
|
|
|
153
|
-
#### Command: `
|
|
191
|
+
#### Command: `ksc-cspell`
|
|
154
192
|
|
|
155
193
|
Kitschpatrol's CSpell shared configuration tools. (Automated fixes are handled by ESLint.)
|
|
156
194
|
|
|
157
|
-
This section lists top-level commands for `
|
|
195
|
+
This section lists top-level commands for `ksc-cspell`.
|
|
158
196
|
|
|
159
197
|
Usage:
|
|
160
198
|
|
|
161
199
|
```txt
|
|
162
|
-
|
|
200
|
+
ksc-cspell <command>
|
|
163
201
|
```
|
|
164
202
|
|
|
165
203
|
| Command | Argument | Description |
|
|
@@ -175,14 +213,14 @@ kpi-cspell <command>
|
|
|
175
213
|
|
|
176
214
|
_See the sections below for more information on each subcommand._
|
|
177
215
|
|
|
178
|
-
#### Subcommand: `
|
|
216
|
+
#### Subcommand: `ksc-cspell init`
|
|
179
217
|
|
|
180
218
|
Initialize by copying starter config files to your project root or to your package.json file.
|
|
181
219
|
|
|
182
220
|
Usage:
|
|
183
221
|
|
|
184
222
|
```txt
|
|
185
|
-
|
|
223
|
+
ksc-cspell init
|
|
186
224
|
```
|
|
187
225
|
|
|
188
226
|
| Option | Description | Type | Default |
|
|
@@ -191,14 +229,14 @@ kpi-cspell init
|
|
|
191
229
|
| `--help`<br>`-h` | Show help | `boolean` | |
|
|
192
230
|
| `--version`<br>`-v` | Show version number | `boolean` | |
|
|
193
231
|
|
|
194
|
-
#### Subcommand: `
|
|
232
|
+
#### Subcommand: `ksc-cspell lint`
|
|
195
233
|
|
|
196
234
|
Check for spelling mistakes. Matches files below the current working directory by default.
|
|
197
235
|
|
|
198
236
|
Usage:
|
|
199
237
|
|
|
200
238
|
```txt
|
|
201
|
-
|
|
239
|
+
ksc-cspell lint [files..]
|
|
202
240
|
```
|
|
203
241
|
|
|
204
242
|
| Positional Argument | Description | Type | Default |
|
|
@@ -210,14 +248,14 @@ kpi-cspell lint [files..]
|
|
|
210
248
|
| `--help`<br>`-h` | Show help | `boolean` |
|
|
211
249
|
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
212
250
|
|
|
213
|
-
#### Subcommand: `
|
|
251
|
+
#### Subcommand: `ksc-cspell print-config`
|
|
214
252
|
|
|
215
253
|
Print the resolved CSpell configuration. Package-scoped. Searches up to the root of a monorepo if necessary.
|
|
216
254
|
|
|
217
255
|
Usage:
|
|
218
256
|
|
|
219
257
|
```txt
|
|
220
|
-
|
|
258
|
+
ksc-cspell print-config
|
|
221
259
|
```
|
|
222
260
|
|
|
223
261
|
| Option | Description | Type |
|
|
@@ -231,8 +269,6 @@ kpi-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 -->
|