cspell "Unknown word (X)" spelling failure in CI
cspell checked your files and found tokens not in any active dictionary, reporting each as "Unknown word (X)" and exiting non-zero. Domain terms, product names, and identifiers commonly trip it.
What this error means
cspell prints lines like "Unknown word (kubectl)" with the file, line, and column, and ends with "Issues found: N in M files", failing the job.
cspell
docs/guide.md:12:8 - Unknown word (kubectl)
docs/guide.md:40:3 - Unknown word (Latchkey)
CSpell: Files checked: 42, Issues found: 2 in 1 files.Common causes
Project vocabulary is not in a dictionary
Commands, brand names, and abbreviations are not in cspell built-in dictionaries, so each is an unknown word.
No custom words list or dictionary is configured
Without a words array or a custom dictionary file in cspell.json, every unrecognized token fails the check.
How to fix it
Add terms to cspell.json words or a dictionary file
- Add short-lived terms to the
wordsarray incspell.json. - For larger lists, reference a custom dictionary file.
- Commit the config so CI recognizes the vocabulary.
cspell.json
{
"version": "0.2",
"words": ["kubectl", "Latchkey", "OAuth"],
"dictionaryDefinitions": [
{ "name": "project", "path": "./project-words.txt", "addWords": true }
],
"dictionaries": ["project"]
}Ignore paths that should not be spell-checked
Exclude generated files and code samples from cspell so they do not produce noise.
cspell.json
{
"ignorePaths": ["CHANGELOG.md", "**/node_modules/**", "dist/**"]
}How to prevent it
- Keep a committed
project-words.txtdictionary and grow it with new terms. - Use
ignorePathsfor generated content and vendored files. - Run cspell in pre-commit so unknown words are caught before CI.
Related guides
cspell "Issues found" with config not loaded in CIFix cspell in CI where "Issues found" appears despite a config, because cspell.json was not found, the glob m…
Vale "spelling" errors fail the docs job in CIFix Vale "N errors" from the Vale.Spelling rule in CI - Vale flags words absent from its dictionary. Add proj…
textlint reports errors and fails the docs job in CIFix textlint "N problems" errors in CI - a textlint rule flagged prose. Auto-fix fixable rules, adjust severi…