Registry / testing / eslint-plugin-spellcheck

eslint-plugin-spellcheck

JSON →
library0.0.20jsnpmunverified

ESLint plugin (v0.0.20, last updated 2022, low release cadence) that checks spelling in identifiers, strings, comments, and templates of JavaScript files using Hunspell dictionaries. Supports multiple English locales (en_US, en_CA, en_AU, en_GB), custom skip words, regex pattern exclusions, and minimum word length. The plugin is lightweight but infrequently maintained; it has no security incidents but the underlying hunspell-spellchecker dependency (v0.4.1) is dated. Alternative with more active development: eslint-plugin-spellcheck (different package) or cspell.

npm install eslint-plugin-spellcheck
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-SPEL
E
eslint-plugin-spellcheck
testingjavascriptv0.0.20
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default config
✓ // In .eslintrc: "plugins": ["spellcheck"], "rules": { "spellcheck/spell-checker": "warn" }
✗ Using 'spellcheck' as rule name without prefix
Rule must be prefixed with 'spellcheck/'
Rule with options
✓ "spellcheck/spell-checker": ["error", { "comments": true, "strings": true, "identifiers": true }]
✗ "spellcheck/spell-checker": "error" // missing options object
Options are passed as second array element
ESLint flat config (eslint.config.js)
✓ import spellcheck from 'eslint-plugin-spellcheck'; export default [ { plugins: { spellcheck }, rules: { 'spellcheck/spell-checker': 'warn' } } ];
✗ Using 'spellcheck' directly as plugin name in flat config
In flat config, plugin object must be imported and assigned

ESLint configuration to enable spell-checker rule with all node types checked, custom skip words, and regex exclusions.

// Install: npm install --save-dev eslint eslint-plugin-spellcheck // .eslintrc.json: { "plugins": ["spellcheck"], "rules": { "spellcheck/spell-checker": ["warn", { "comments": true, "strings": true, "identifiers": true, "templates": true, "lang": "en_US", "skipWords": ["eslint", "plugin", "spellcheck"], "skipIfMatch": ["http://[^s]*"], "skipWordIfMatch": ["^foobar.*$"], "minLength": 3 }] } }
Debug
Known issues
gotchaThe plugin uses the 'hunspell-spellchecker' package which is outdated (v0.4.1) and may produce false positives for modern JavaScript identifiers (e.g., camelCase words, JSX).
fix
Add frequently used words to 'skipWords' or use 'skipIfMatch' for patterns.
affects: <=0.0.20
breakingThe plugin requires ESLint >=0.8.0, but does not support ESLint 9.x or flat config natively (requires manual plugin import for flat config).
fix
For ESLint >=9 use flat config: import spellcheck from 'eslint-plugin-spellcheck' and add to plugins object.
affects: >=0.0.1
gotchaSetting 'comments: false' or 'strings: false' may be ignored if the parsed node type includes both (e.g., JSDoc comments with string-like content).
fix
Use 'skipIfMatch' to exclude specific patterns, or test each node individually.
affects: >=0.0.1
deprecatedThe 'enableUpperCaseUnderscoreCheck' option (default false) is poorly documented; setting it false may still check some uppercase underscores.
fix
Set to true to enable checking, or rely on default behavior with 'skipWords' for known patterns.
affects: >=0.0.18
gotchaThe 'langDir' option expects a path to a directory containing .aff and .dic files for Hunspell; using an invalid path silently falls back to default language files.
fix
Ensure the directory contains both 'en_US.aff' and 'en_US.dic' (for en_US) or corresponding files for other locales.
affects: >=0.0.18
Errors
Common errors & fixes
Error: Failed to load plugin 'spellcheck': Cannot find module 'eslint-plugin-spellcheck'
Plugin not installed or missing from node_modules.
fix
Run 'npm install --save-dev eslint-plugin-spellcheck'
ESLint: Configuration for rule "spellcheck/spell-checker" is invalid: Value "[object Object]" is not a valid severity.
Rule options passed as object directly, not as array element.
fix
Use array syntax: ["warn", { ... }]
Error: Cannot find module 'hunspell-spellchecker'
hunspell-spellchecker not installed (plugin should install it automatically).
fix
Run 'npm install' or manually add 'hunspell-spellchecker' to devDependencies.
Upgrade
Version history
0.0.20latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required to use the plugin
hunspell-spellcheckerrequiredruntime dependency for spell-checking engine
Agent activity
6 hits · last 30 days
node
6
Resources