Optional $schemaUrl to JSON Schema
"https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json"
Optional __importOptional __importsOptional allowTrue to enable compound word checking. See Case Sensitivity for more details.
false
Optional cacheDefine cache settings.
Optional caseDetermines if words must match case and accent rules.
false - Case is ignored and accents can be missing on the entire word.
Incorrect accents or partially missing accents will be marked as incorrect.true - Case and accents are enforced.false
Optional descriptionOptional description of configuration.
Optional dictionariesOptional list of dictionaries to use. Each entry should match the name of the dictionary.
To remove a dictionary from the list, add ! before the name.
For example, !typescript will turn off the dictionary with the name typescript.
See the Dictionaries and Custom Dictionaries for more details.
Optional dictionaryDefine additional available dictionaries.
For example, you can use the following to add a custom dictionary:
"dictionaryDefinitions": [
{ "name": "custom-words", "path": "./custom-words.txt"}
],
"dictionaries": ["custom-words"]
Optional enableEnable / Disable checking file types (languageIds).
These are in additional to the file types specified by cSpell.enabledLanguageIds.
To disable a language, prefix with ! as in !json,
Example:
jsonc // enable checking for jsonc
!json // disable checking for json
kotlin // enable checking for kotlin
File Types to Check
resource
true
Optional enableEnable scanning files and directories beginning with . (period).
By default, CSpell does not scan hidden files.
false
Optional enabledIs the spell checker enabled.
true
Optional enabledlanguageIds for the files to spell check.
Optional failExit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks)
false
Optional featuresConfigure CSpell features.
5.16.0
Optional filesGlob patterns of files to be checked.
Glob patterns are relative to the globRoot of the configuration file that defines them.
Optional flagList of words to always be considered incorrect. Words found in flagWords override words.
Format of flagWords
wordword:suggestion or word->suggestion, suggestionsExample:
"flagWords": [
"color: colour",
"incase: in case, encase",
"canot->cannot",
"cancelled->canceled"
]
Optional gitignoreTells the spell checker to stop searching for .gitignore files when it reaches a matching root.
Optional globThe root to use for glob patterns found in this configuration.
Default: location of the configuration file.
For compatibility reasons, config files with version 0.1, the glob root will
default to be ${cwd}.
Use globRoot to define a different location.
globRoot can be relative to the location of this configuration file.
Defining globRoot, does not impact imported configurations.
Special Values:
${cwd} - will be replaced with the current working directory.. - will be the location of the containing configuration file.Optional idOptional identifier.
Optional ignoreGlob patterns of files to be ignored.
Glob patterns are relative to the globRoot of the configuration file that defines them.
Optional ignoreList of regular expression patterns or pattern names to exclude from spell checking.
Example: ["href"] - to exclude html href pattern.
Regular expressions use JavaScript regular expression syntax.
Example: to ignore ALL-CAPS words
JSON
"ignoreRegExpList": ["/\\b[A-Z]+\\b/g"]
YAML
ignoreRegExpList:
- >-
/\b[A-Z]+\b/g
By default, several patterns are excluded. See Configuration for more details.
While you can create your own patterns, you can also leverage several patterns that are built-in to CSpell.
Optional ignoreList of words to be ignored. An ignored word will not show up as an error, even if it is
also in the flagWords.
Optional importAllows this configuration to inherit configuration for one or more other files.
See Importing / Extending Configuration for more details.
Optional includeList of regular expression patterns or defined pattern names to match for spell checking.
If this property is defined, only text matching the included patterns will be checked.
While you can create your own patterns, you can also leverage several patterns that are built-in to CSpell.
Optional languageCurrent active spelling language. This specifies the language locale to use in choosing the general dictionary.
For example:
"en"
Optional languageForces the spell checker to assume a give language id. Used mainly as an Override.
Optional languageAdditional settings for individual languages.
See Language Settings for more details.
Optional loadBy default, the bundled dictionary configurations are loaded. Explicitly setting this to false
will prevent ALL default configuration from being loaded.
true
Optional maxThe maximum number of times the same word can be flagged as an error in a file.
5
Optional maxThe maximum number of problems to report in a file.
10000
Optional minThe minimum length of a word before checking it against a dictionary.
4
Optional nameOptional name of configuration.
Optional noPrevents searching for local configuration when checking individual documents.
false
Optional noOptional list of dictionaries that will not be used for suggestions. Words in these dictionaries are considered correct, but will not be used when making spell correction suggestions.
Note: if a word is suggested by another dictionary, but found in one of these dictionaries, it will be removed from the set of possible suggestions.
Optional numNumber of suggestions to make.
10
Optional overridesOverrides are used to apply settings for specific files in your project.
For example:
"overrides": [
// Force `*.hrr` and `*.crr` files to be treated as `cpp` files:
{
"filename": "**/{*.hrr,*.crr}",
"languageId": "cpp"
},
// Force `*.txt` to use the Dutch dictionary (Dutch dictionary needs to be installed separately):
{
"language": "nl",
"filename": "**/dutch/**/*.txt"
}
]
Optional Experimental parserParser to use for the file content
6.2.0
Optional patternsDefines a list of patterns that can be used with the ignoreRegExpList and
includeRegExpList options.
For example:
"ignoreRegExpList": ["comments"],
"patterns": [
{
"name": "comment-single-line",
"pattern": "/#.*/g"
},
{
"name": "comment-multi-line",
"pattern": "/(?:\\/\\*[\\s\\S]*?\\*\\/)/g"
},
// You can also combine multiple named patterns into one single named pattern
{
"name": "comments",
"pattern": ["comment-single-line", "comment-multi-line"]
}
]
Defines a list of patterns that can be used with the ignoreRegExpList and
includeRegExpList options.
Optional pnpThe PnP files to search for. Note: .mjs files are not currently supported.
[".pnp.js", ".pnp.cjs"]
Optional readonlyIndicate that the configuration file should not be modified. This is used to prevent tools like the VS Code Spell Checker from modifying the file to add words and other configuration.
false
Optional reportersDefine which reports to use.
default - is a special name for the default cli reporter.
Examples:
["default"] - to use the default reporter["@cspell/cspell-json-reporter"] - use the cspell JSON reporter.[["@cspell/cspell-json-reporter", { "outFile": "out.json" }]][ "default", ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]] - Use both the default reporter and the cspell-json-reporter.["default"]
Optional showShow status.
true
Optional sourceOptional spellDelay in ms after a document has changed before checking it for spelling errors.
true
Optional suggestA list of suggested replacements for words. Suggested words provide a way to make preferred suggestions on word replacements. To hint at a preferred change, but not to require it.
Format of suggestWords
word: suggestionword->suggestionword: first, second, thirdword->first, second, thirdOptional suggestionThe maximum number of changes allowed on a word to be considered a suggestions.
For example, appending an s onto example -> examples is considered 1 change.
Range: between 1 and 5.
3
Optional suggestionsThe maximum amount of time in milliseconds to generate suggestions for a word.
500
Optional useTells the spell checker to load .gitignore files and skip files that match the globs in the .gitignore files found.
false
Optional usePackages managers like Yarn 2 use a .pnp.cjs file to assist in loading
packages stored in the repository.
When true, the spell checker will search up the directory structure for the existence of a PnP file and load it.
false
Optional userWords to add to global dictionary -- should only be in the user config file.
Optional validateVerify that the in-document directives are correct.
Optional versionConfiguration format version of the settings file.
This controls how the settings in the configuration file behave.
"0.2"
Optional wordsList of words to be considered correct.
Generated using TypeDoc
In the below JSDoc comment, we helpfully specify an example configuration for the end-user to reference. And this example will get captured by the automatic documentation generator.
However, specifying the glob pattern inside of a JSDoc is tricky, because the glob contains the same symbol as the end-of-JSDoc symbol. To work around this, we insert a zero-width space in between the "*" and the "/" symbols.