Skip to content

Commit

Permalink
chore(infra): add cspell (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter authored Jun 24, 2024
1 parent 0dfdfc5 commit 09c5549
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 3 deletions.
30 changes: 30 additions & 0 deletions cspell.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const { banWords } = require('cspell-ban-words');

module.exports = {
version: '0.2',
language: 'en',
files: ['**/*.{ts,tsx,js,jsx,md,mdx}'],
enableFiletypes: ['mdx'],
ignoreRegExpList: [
// ignore markdown anchors such as [modifyRsbuildConfig](#modifyrsbuildconfig)
'#.*?\\)',
],
ignorePaths: [
'dist',
'dist-*',
'compiled',
'coverage',
'doc_build',
'node_modules',
'pnpm-lock.yaml',
],
flagWords: banWords,
dictionaries: ['dictionary'],
dictionaryDefinitions: [
{
name: 'dictionary',
path: './scripts/dictionary.txt',
addWords: true,
},
],
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"build": "cross-env NX_DAEMON=false nx run-many -t build --exclude @examples/* --parallel=10",
"build:examples": "cross-env NX_DAEMON=false nx run-many -t build --projects @examples/* --parallel=10",
"check-dependency-version": "check-dependency-version-consistency .",
"lint": "biome check . --diagnostic-level=warn",
"check-spell": "npx cspell",
"lint": "biome check . --diagnostic-level=warn && pnpm run check-spell",
"prebundle": "nx run-many -t prebundle",
"prepare": "pnpm run build && simple-git-hooks",
"sort-package-json": "npx sort-package-json \"packages/*/package.json\"",
Expand All @@ -29,6 +30,7 @@
"@modern-js/module-tools": "^2.53.0",
"check-dependency-version-consistency": "^4.1.0",
"cross-env": "^7.0.3",
"cspell-ban-words": "^0.0.3",
"nano-staged": "^0.8.0",
"nx": "^19.3.0",
"prettier": "^3.3.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export async function createInternalRsbuildConfig(): Promise<RsbuildConfig> {
});
}

export function convertLibConfigtoRsbuildConfig(
export function convertLibConfigToRsbuildConfig(
libConfig: LibConfig,
rsbuildConfig: RsbuildConfig,
): RsbuildConfig {
Expand Down Expand Up @@ -157,7 +157,7 @@ export async function composeCreateRsbuildConfig(
internalRsbuildConfig,
);

return convertLibConfigtoRsbuildConfig(libConfig, mergedRsbuildConfig);
return convertLibConfigToRsbuildConfig(libConfig, mergedRsbuildConfig);
});

return composedRsbuildConfig;
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

119 changes: 119 additions & 0 deletions scripts/dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Custom Dictionary Words
antd
apng
applescript
atrules
biomejs
brotli
browserslistrc
bundleless
caniuse
chunkhash
Chunktmp
classname
codegen
codesandbox
compat
consolas
contentful
corejs
corepack
craco
crossorigin
datauri
deepmerge
docgen
envinfo
estree
facti
filenaming
flac
flexbox
flexbugs
fnames
frontends
fullhash
gzipped
icss
idents
iife
imagex
jfif
jiti
jscpuprofile
jsesc
koppers
lightningcss
liyincode
longpaths
manypkg
mattcompiles
menlo
microfrontend
microfrontends
modularly
napi
nolyfill
ntqry
onclosetag
onopentag
ontext
osascript
outro
pageerror
pathinfo
pcss
perfetto
picocolors
pjpeg
pluggable
pmmmwh
postcssrc
preact
prebundle
preflights
prefresh
preprocessors
pxtorem
rebranded
rolldown
rsbuild
rsdoctor
rsfamily
rslib
rslog
rspack
rspress
selfsign
selfsigned
sirv
sokra
speedscope
srcset
stacktracey
styl
stylex
subdir
subpage
subresource
subresources
svgr
swcrc
systemjs
tailwindcss
taze
templating
transpiling
treeshaking
tsbuildinfo
tsdoc
unocss
unpatch
unplugin
unshift
upath
vitest
vnode
watchpack
webm
webp

0 comments on commit 09c5549

Please sign in to comment.