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-spellcheckVerified import paths — ran on the pinned version, not inferred.
ESLint configuration to enable spell-checker rule with all node types checked, custom skip words, and regex exclusions.
Add frequently used words to 'skipWords' or use 'skipIfMatch' for patterns.
For ESLint >=9 use flat config: import spellcheck from 'eslint-plugin-spellcheck' and add to plugins object.
Use 'skipIfMatch' to exclude specific patterns, or test each node individually.
Set to true to enable checking, or rely on default behavior with 'skipWords' for known patterns.
Ensure the directory contains both 'en_US.aff' and 'en_US.dic' (for en_US) or corresponding files for other locales.
Run 'npm install --save-dev eslint-plugin-spellcheck'
Use array syntax: ["warn", { ... }]Run 'npm install' or manually add 'hunspell-spellchecker' to devDependencies.