{"id":19946,"library":"eslint-plugin-spellcheck","title":"eslint-plugin-spellcheck","description":"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.","status":"maintenance","version":"0.0.20","language":"javascript","source_language":"en","source_url":"https://github.com/aotaduy/eslint-plugin-spellcheck","tags":["javascript","eslint","eslintplugin","spellcheck","spelling"],"install":[{"cmd":"npm install eslint-plugin-spellcheck","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-spellcheck","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-spellcheck","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to use the plugin","package":"eslint","optional":false},{"reason":"runtime dependency for spell-checking engine","package":"hunspell-spellchecker","optional":false}],"imports":[{"note":"Rule must be prefixed with 'spellcheck/'","wrong":"Using 'spellcheck' as rule name without prefix","symbol":"default config","correct":"// In .eslintrc:\n\"plugins\": [\"spellcheck\"],\n\"rules\": {\n  \"spellcheck/spell-checker\": \"warn\"\n}"},{"note":"Options are passed as second array element","wrong":"\"spellcheck/spell-checker\": \"error\" // missing options object","symbol":"Rule with options","correct":"\"spellcheck/spell-checker\": [\"error\", { \"comments\": true, \"strings\": true, \"identifiers\": true }]"},{"note":"In flat config, plugin object must be imported and assigned","wrong":"Using 'spellcheck' directly as plugin name in flat config","symbol":"ESLint flat config (eslint.config.js)","correct":"import spellcheck from 'eslint-plugin-spellcheck';\nexport default [\n  {\n    plugins: { spellcheck },\n    rules: { 'spellcheck/spell-checker': 'warn' }\n  }\n];"}],"quickstart":{"code":"// Install: npm install --save-dev eslint eslint-plugin-spellcheck\n// .eslintrc.json:\n{\n  \"plugins\": [\"spellcheck\"],\n  \"rules\": {\n    \"spellcheck/spell-checker\": [\"warn\", {\n      \"comments\": true,\n      \"strings\": true,\n      \"identifiers\": true,\n      \"templates\": true,\n      \"lang\": \"en_US\",\n      \"skipWords\": [\"eslint\", \"plugin\", \"spellcheck\"],\n      \"skipIfMatch\": [\"http://[^s]*\"],\n      \"skipWordIfMatch\": [\"^foobar.*$\"],\n      \"minLength\": 3\n    }]\n  }\n}","lang":"json","description":"ESLint configuration to enable spell-checker rule with all node types checked, custom skip words, and regex exclusions."},"warnings":[{"fix":"Add frequently used words to 'skipWords' or use 'skipIfMatch' for patterns.","message":"The 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).","severity":"gotcha","affected_versions":"<=0.0.20"},{"fix":"For ESLint >=9 use flat config: import spellcheck from 'eslint-plugin-spellcheck' and add to plugins object.","message":"The plugin requires ESLint >=0.8.0, but does not support ESLint 9.x or flat config natively (requires manual plugin import for flat config).","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Use 'skipIfMatch' to exclude specific patterns, or test each node individually.","message":"Setting 'comments: false' or 'strings: false' may be ignored if the parsed node type includes both (e.g., JSDoc comments with string-like content).","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Set to true to enable checking, or rely on default behavior with 'skipWords' for known patterns.","message":"The 'enableUpperCaseUnderscoreCheck' option (default false) is poorly documented; setting it false may still check some uppercase underscores.","severity":"deprecated","affected_versions":">=0.0.18"},{"fix":"Ensure the directory contains both 'en_US.aff' and 'en_US.dic' (for en_US) or corresponding files for other locales.","message":"The '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.","severity":"gotcha","affected_versions":">=0.0.18"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install --save-dev eslint-plugin-spellcheck'","cause":"Plugin not installed or missing from node_modules.","error":"Error: Failed to load plugin 'spellcheck': Cannot find module 'eslint-plugin-spellcheck'"},{"fix":"Use array syntax: [\"warn\", { ... }]","cause":"Rule options passed as object directly, not as array element.","error":"ESLint: Configuration for rule \"spellcheck/spell-checker\" is invalid: Value \"[object Object]\" is not a valid severity."},{"fix":"Run 'npm install' or manually add 'hunspell-spellchecker' to devDependencies.","cause":"hunspell-spellchecker not installed (plugin should install it automatically).","error":"Error: Cannot find module 'hunspell-spellchecker'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}