You can configure yaspeller using a JSON file located in your project root. Supported filenames include:
.yaspellerrc.yaspellerrc.js.yaspellerrc.json.yaspeller.json- The
yaspeller field in package.json
Configuration Schema:
| Property | Type | Description |
|---|
format | String | Output format (see --format) |
lang | String | Languages (e.g., en, ru, uk) |
excludeFiles | Array | Files/directories to exclude |
fileExtensions | Array | Extensions to check (e.g., [".md", ".txt"]) |
dictionary | Array | Custom dictionary entries (strings or regex) |
report | Array | Report types (e.g., ["console", "html"]) |
checkYo | Boolean | Check correctness of the letter "ё" in Russian |
findRepeatWords | Boolean | Find consecutive repeated words |
ignoreTags | Array | HTML tags to ignore (e.g., ["code", "script"]) |
ignoreText | Array | Regex patterns to exclude text |
ignoreCapitalization | Boolean | Ignore case mismatches |
ignoreDigits | Boolean | Skip words containing digits |
ignoreUrls | Boolean | Skip URLs, emails, and filenames |
maxRequests | Number | Concurrent requests to Yandex Speller API |
Example Configuration:
{
"excludeFiles": [
".git",
"node_modules"
],
"format": "html",
"lang": "en",
"fileExtensions": [".md", ".txt"],
"report": ["console", "html"],
"dictionary": [
"someword1",
"Some(w|W)ord"
],
"ignoreTags": ["code", "script"],
"ignoreUrls": true,
"findRepeatWords": true,
"maxRequests": 5
}
{
"excludeFiles": [
".git",
"yaspeller",
"node_modules",
"libs"
],
"format": "html",
"lang": "en",
"fileExtensions": [
".md",
".txt"
],
"report": ["console", "html"],
"dictionary": [
"someword1",
"Some(w|W)ord"
],
"ignoreTags": ["code", "script"],
"ignoreText": [
"<php\?[^]*?\?>"
],
"ignoreUrls": true,
"findRepeatWords": true,
"maxRequests": 5
}