{"id":19776,"library":"eslint-plugin-haraka","title":"Haraka ESLint Plugin","description":"ESLint plugin providing Haraka-specific rules and recommended configuration for Haraka projects. Current stable version is 2.0.4 (as of 2025), with a major breaking change in v2.0.0 that depends on ESLint 9. The plugin enforces best practices for Haraka plugin development, including environment globals, ECMAScript version (es2024), and custom rules like no-unused-vars. It is actively maintained with frequent releases, typically following Haraka core updates. Key differentiators: tailored for Haraka's plugin architecture, includes a 'recommended' config, and integrates with flat config in ESLint 9.","status":"active","version":"1.0.16","language":"javascript","source_language":"en","source_url":"https://github.com/haraka/haraka-eslint","tags":["javascript","haraka","lint","eslint","test"],"install":[{"cmd":"npm install eslint-plugin-haraka","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-haraka","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-haraka","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: requires ESLint 9+ since v2.0.0","package":"eslint","optional":false},{"reason":"Peer dependency for ESLint 9 flat config","package":"@eslint/js","optional":true},{"reason":"Peer dependency for ESLint 9 backwards compatibility","package":"@eslint/eslintrc","optional":true}],"imports":[{"note":"Must include 'plugin:' prefix in ESLint config files.","wrong":"extends: ['haraka/recommended']","symbol":"plugin:haraka/recommended","correct":"extends: ['plugin:haraka/recommended']"},{"note":"ESM-only; no CommonJS support in v2. Use dynamic import() if needed.","wrong":"const haraka = require('eslint-plugin-haraka')","symbol":"default (plugin)","correct":"import haraka from 'eslint-plugin-haraka'"},{"note":"For flat config (ESLint 9+), access configs via 'configs.recommended'.","wrong":"import haraka from 'eslint-plugin-haraka'; export default [...haraka.recommended]","symbol":"configs.recommended","correct":"import { configs } from 'eslint-plugin-haraka'; export default [...configs.recommended]"}],"quickstart":{"code":"// .eslintrc.yaml\nplugins:\n  - haraka\nextends:\n  - eslint:recommended\n  - plugin:haraka/recommended\n\n// package.json\n{\n  \"scripts\": {\n    \"lint\": \"npx eslint *.js test\",\n    \"lintfix\": \"npx eslint --fix *.js test\"\n  }\n}\n\n// Install\nnpm install --save-dev eslint eslint-plugin-haraka\n\n// Run lint\nnpm run lint","lang":"javascript","description":"Installs the plugin, sets up .eslintrc.yaml with Haraka recommended config, and provides npm scripts for linting and auto-fix."},"warnings":[{"fix":"Upgrade ESLint to v9+ and migrate to flat config if needed. See ESLint migration guide.","message":"v2.0.0 drops support for ESLint 8 and below. Requires ESLint 9 or higher.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Remove any references to removed rules from your config. Use separate formatting tools like Prettier.","message":"v2.0.0 removed deprecated formatting rules that were previously included.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'plugin:haraka/recommended' instead of 'haraka:recommended' and ensure eslint:recommended is also extended.","message":"v1.1.1 removed the 'haraka:recommended' config and rules included in eslint:recommended.","severity":"breaking","affected_versions":">=1.1.1"},{"fix":"If you customize no-unused-vars, you may need to update your config to respect caught exceptions.","message":"The no-unused-vars rule now includes 'caughtErrorsIgnorePattern' in v2.0.3.","severity":"deprecated","affected_versions":">=2.0.3"},{"fix":"If you modify globals in your config, ensure they are consistent with 'readonly' or 'writable'.","message":"Globals are now specified as 'readonly' by default since v2.0.2; previously they were set to true.","severity":"gotcha","affected_versions":">=2.0.2"}],"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-haraka' and ensure it's in devDependencies.","cause":"Plugin not installed or not listed in package.json.","error":"Error: Cannot find module 'eslint-plugin-haraka'"},{"fix":"Check the plugin version; no-unused-vars was added in v1.1.4 but may be removed in later versions. Use eslint's built-in no-unused-vars instead.","cause":"Rule no longer exists or has been renamed in a newer version.","error":"Configuration for rule 'haraka/no-unused-vars' is invalid"},{"fix":"Ensure your .eslintrc uses 'extends: [\"plugin:haraka/recommended\"]' and the plugin is installed.","cause":"The config name is incorrect or the plugin is not properly loaded.","error":"ESLint couldn't find the config 'plugin:haraka/recommended'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}