Fix Repeated CSpell Warnings with a Project Dictionary

If CSpell flags the same product name in several files, adding the same exception to each file leaves the next occurrence waiting for another fix. A project dictionary lets those files share the accepted spelling. The useful part is deciding what deserves that scope, then checking that ordinary typos still fail.
The localizations repository has a small convention worth copying: review the vocabulary change with the content that needs it.
Define the dictionary, then enable it
Its contributor instruction says:
When adding new product names or technical terms, update
.cspell/custom-dictionary.txtif spellcheck flags them.
The corresponding configuration is:
dictionaryDefinitions:
- name: custom-dictionary
path: ./.cspell/custom-dictionary.txt
addWords: true
dictionaries:
- custom-dictionary
Both parts matter: dictionaryDefinitions gives the word list a name and path; dictionaries enables that name.
The path is relative to the configuration file.
addWords: true tells supporting editor integrations that they may add words to this dictionary; it is not the switch that enables lookup. CSpell documents this setup.
The actual word list includes Bitrise, Embla, and donminzzi.
Those entries apply to files checked with this configuration, rather than requiring an exception in every file.
Review the word with the sentence that introduced it
A dictionary diff is easy to approve too quickly. Before accepting an entry, ask what the warning represents:
- A product or technical term the project uses intentionally: confirm its spelling against its source, then add it with the content change.
- An ordinary word spelled incorrectly: fix the content.
- Deliberately invalid input in a test fixture: keep the exception scoped to the fixture under the repository's policy.
For example, a patch introducing a product name should let the reviewer see both the sentence using it and the dictionary addition. Reviewing only a batch of unknown words removes the context needed to distinguish vocabulary from mistakes. Keeping the list in one file makes that review convenient; it does not perform the review.
Check that the exception works without hiding a typo
Here is a small wiring check using the existing donminzzi entry and an intentional typo.
In a scratch directory, use the YAML above as cspell.config.yaml, copy the dictionary into .cspell/custom-dictionary.txt, and create vocabulary-probe.md:
donminzzi
synchronizaton
With an installed CSpell CLI, run from that scratch directory:
cspell --no-config-search --config cspell.config.yaml --words-only vocabulary-probe.md
An isolated check with CSpell 10.0.1 reported only synchronizaton.
Removing donminzzi from the scratch dictionary made it report both words; restoring the entry removed only that warning.
The command still exited with status 1 because the deliberate typo remained.
This checks the dictionary wiring, not the spelling of every entry or the repository's full lint pipeline.
Inline settings still have a place, but their scope matters.
cspell:ignore word ignores that word throughout the document; it does not disable checking just one line.
cspell:words also applies throughout the file, while cspell:disable-next-line disables checking through the next line. CSpell's document settings reference distinguishes these behaviors.
The localizations instruction asks for shared entries when new terms need them; it does not declare every inline exception forbidden.
Adopt that distinction with the configuration: approved project vocabulary belongs in the shared list, and an intentionally unusual fixture needs an exception sized to the fixture.
Get the next post.
Follow new posts in your RSS reader.