How to Forbid Words
Making Words Forbidden
There are several ways to mark a word as forbidden:
-
In a custom word list with words beginning with
!.!forbiddenWord
companyname
jQuery
projectnameforbiddenWordwill always be marked as misspelled. Whilecompanynamewill be considered correct. -
In
wordssection ofcspellconfiguration:"words": [
"!forbiddenWord",
"configstore"
], -
In
flagWordssection ofcspellconfiguration:"flagWords": ["forbiddenWord"]
Overriding Forbidden words
Sometimes it is necessary to allow a word even if it is forbidden.
In a comment
/**
* Do not mark `forbiddenWord` as incorrect.
* cspell:ignore forbiddenWord
*/
In the cspell configuration
{
"ignoreWords": ["forbiddenWord"]
}