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 projectname
forbiddenWord
will always be marked as misspelled. Whilecompanyname
will be considered correct. -
In
words
section ofcspell
configuration:"words": [ "!forbiddenWord", "configstore" ],
-
In
flagWords
section ofcspell
configuration:"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"]
}