Skip to content

Commit 09c5549

Browse files
authored
chore(infra): add cspell (#17)
1 parent 0dfdfc5 commit 09c5549

File tree

5 files changed

+162
-3
lines changed

5 files changed

+162
-3
lines changed

cspell.config.cjs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const { banWords } = require('cspell-ban-words');
2+
3+
module.exports = {
4+
version: '0.2',
5+
language: 'en',
6+
files: ['**/*.{ts,tsx,js,jsx,md,mdx}'],
7+
enableFiletypes: ['mdx'],
8+
ignoreRegExpList: [
9+
// ignore markdown anchors such as [modifyRsbuildConfig](#modifyrsbuildconfig)
10+
'#.*?\\)',
11+
],
12+
ignorePaths: [
13+
'dist',
14+
'dist-*',
15+
'compiled',
16+
'coverage',
17+
'doc_build',
18+
'node_modules',
19+
'pnpm-lock.yaml',
20+
],
21+
flagWords: banWords,
22+
dictionaries: ['dictionary'],
23+
dictionaryDefinitions: [
24+
{
25+
name: 'dictionary',
26+
path: './scripts/dictionary.txt',
27+
addWords: true,
28+
},
29+
],
30+
};

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"build": "cross-env NX_DAEMON=false nx run-many -t build --exclude @examples/* --parallel=10",
66
"build:examples": "cross-env NX_DAEMON=false nx run-many -t build --projects @examples/* --parallel=10",
77
"check-dependency-version": "check-dependency-version-consistency .",
8-
"lint": "biome check . --diagnostic-level=warn",
8+
"check-spell": "npx cspell",
9+
"lint": "biome check . --diagnostic-level=warn && pnpm run check-spell",
910
"prebundle": "nx run-many -t prebundle",
1011
"prepare": "pnpm run build && simple-git-hooks",
1112
"sort-package-json": "npx sort-package-json \"packages/*/package.json\"",
@@ -29,6 +30,7 @@
2930
"@modern-js/module-tools": "^2.53.0",
3031
"check-dependency-version-consistency": "^4.1.0",
3132
"cross-env": "^7.0.3",
33+
"cspell-ban-words": "^0.0.3",
3234
"nano-staged": "^0.8.0",
3335
"nx": "^19.3.0",
3436
"prettier": "^3.3.2",

packages/core/src/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export async function createInternalRsbuildConfig(): Promise<RsbuildConfig> {
100100
});
101101
}
102102

103-
export function convertLibConfigtoRsbuildConfig(
103+
export function convertLibConfigToRsbuildConfig(
104104
libConfig: LibConfig,
105105
rsbuildConfig: RsbuildConfig,
106106
): RsbuildConfig {
@@ -157,7 +157,7 @@ export async function composeCreateRsbuildConfig(
157157
internalRsbuildConfig,
158158
);
159159

160-
return convertLibConfigtoRsbuildConfig(libConfig, mergedRsbuildConfig);
160+
return convertLibConfigToRsbuildConfig(libConfig, mergedRsbuildConfig);
161161
});
162162

163163
return composedRsbuildConfig;

pnpm-lock.yaml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/dictionary.txt

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Custom Dictionary Words
2+
antd
3+
apng
4+
applescript
5+
atrules
6+
biomejs
7+
brotli
8+
browserslistrc
9+
bundleless
10+
caniuse
11+
chunkhash
12+
Chunktmp
13+
classname
14+
codegen
15+
codesandbox
16+
compat
17+
consolas
18+
contentful
19+
corejs
20+
corepack
21+
craco
22+
crossorigin
23+
datauri
24+
deepmerge
25+
docgen
26+
envinfo
27+
estree
28+
facti
29+
filenaming
30+
flac
31+
flexbox
32+
flexbugs
33+
fnames
34+
frontends
35+
fullhash
36+
gzipped
37+
icss
38+
idents
39+
iife
40+
imagex
41+
jfif
42+
jiti
43+
jscpuprofile
44+
jsesc
45+
koppers
46+
lightningcss
47+
liyincode
48+
longpaths
49+
manypkg
50+
mattcompiles
51+
menlo
52+
microfrontend
53+
microfrontends
54+
modularly
55+
napi
56+
nolyfill
57+
ntqry
58+
onclosetag
59+
onopentag
60+
ontext
61+
osascript
62+
outro
63+
pageerror
64+
pathinfo
65+
pcss
66+
perfetto
67+
picocolors
68+
pjpeg
69+
pluggable
70+
pmmmwh
71+
postcssrc
72+
preact
73+
prebundle
74+
preflights
75+
prefresh
76+
preprocessors
77+
pxtorem
78+
rebranded
79+
rolldown
80+
rsbuild
81+
rsdoctor
82+
rsfamily
83+
rslib
84+
rslog
85+
rspack
86+
rspress
87+
selfsign
88+
selfsigned
89+
sirv
90+
sokra
91+
speedscope
92+
srcset
93+
stacktracey
94+
styl
95+
stylex
96+
subdir
97+
subpage
98+
subresource
99+
subresources
100+
svgr
101+
swcrc
102+
systemjs
103+
tailwindcss
104+
taze
105+
templating
106+
transpiling
107+
treeshaking
108+
tsbuildinfo
109+
tsdoc
110+
unocss
111+
unpatch
112+
unplugin
113+
unshift
114+
upath
115+
vitest
116+
vnode
117+
watchpack
118+
webm
119+
webp

0 commit comments

Comments
 (0)