Skip to content

Commit 6250467

Browse files
committed
Replace node-markdown-spellcheck with cspell for spell checking
Signed-off-by: Abhiraj Marne <abhirajmarne11@gmail.com>
1 parent 70a0e03 commit 6250467

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ This will automatically run a number of checks against your local environment, i
197197

198198
* Lint checks on the nextjs code using [next lint](https://nextjs.org/docs/basic-features/eslint).
199199
* Link checks on all pages using [markdown-link-check](https://github.com/tcort/markdown-link-check).
200-
* Spelling in all pages using [mdspell](https://github.com/lukeapage/node-markdown-spellcheck).
200+
* Spelling in all pages using [cspell](https://cspell.org/).
201201
* Formatting of the markdown in all pages using [remark](https://github.com/remarkjs/remark).
202202

203203
> ℹ️ All these checks are also run automatically for pull requests.

cspell.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"version": "0.2",
3+
"language": "en-us",
4+
"ignorePaths": [
5+
"node_modules/**",
6+
".git/**",
7+
"package-lock.json",
8+
"yarn.lock",
9+
"**/api-docs.md",
10+
"content/*docs/policy/approval/approver-policy/api-reference.md",
11+
"content/*docs/trust/trust-manager/api-reference.md"
12+
],
13+
"dictionaryDefinitions": [
14+
{
15+
"name": "project-words",
16+
"path": ".spelling",
17+
"description": "Custom words for the project"
18+
}
19+
],
20+
"dictionaries": [
21+
"project-words"
22+
]
23+
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"check:eslint": "eslint .",
2525
"check:stylelint": "stylelint **/*.css",
2626
"check:links": "find content/docs -type f -name '*.md' | xargs markdown-link-check --quiet --config markdown-link-check.json 2>&1 | awk -v RS=FILE: '/ERROR/{f=1; print RS $0} END{exit f}' # Split into records based on the word FILE and print only records containing word ERROR",
27-
"check:spelling": "FORCE_COLOR=1 mdspell --report --en-us --ignore-numbers --ignore-acronyms 'content/**/*.md' 'content/**/*.html' '_layouts/*.html' '_includes/*.html' '*.html' '!**/api-docs.md' '!content/*docs/policy/approval/approver-policy/api-reference.md' '!content/*docs/trust/trust-manager/api-reference.md' # Force color output in mdspell. # See https://github.com/lukeapage/node-markdown-spellcheck/issues/36#issuecomment-482649408 ",
27+
"check:spelling": "cspell --no-progress --show-suggestions --cache -- './*.md' './content/**/*.md' './content/**/*.html' './_layouts/*.html' './_includes/*.html'",
2828
"check:markdown": "remark --rc-path .remarkrc --frail --quiet content/"
2929
},
3030
"lint-staged": {
@@ -95,7 +95,7 @@
9595
"format-api-docs": "file:scripts/gendocs/postprocess",
9696
"globals": "17.3.0",
9797
"markdown-link-check": "3.14.2",
98-
"markdown-spellcheck": "1.3.1",
98+
"cspell": "8.19.3",
9999
"next-sitemap": "4.2.3",
100100
"postcss": "8.5.6",
101101
"prettier": "3.8.1",

0 commit comments

Comments
 (0)