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.
npm install eslint-plugin-harakaVerified import paths — ran on the pinned version, not inferred.
Installs the plugin, sets up .eslintrc.yaml with Haraka recommended config, and provides npm scripts for linting and auto-fix.
Upgrade ESLint to v9+ and migrate to flat config if needed. See ESLint migration guide.
Remove any references to removed rules from your config. Use separate formatting tools like Prettier.
Use 'plugin:haraka/recommended' instead of 'haraka:recommended' and ensure eslint:recommended is also extended.
If you customize no-unused-vars, you may need to update your config to respect caught exceptions.
If you modify globals in your config, ensure they are consistent with 'readonly' or 'writable'.
Run 'npm install --save-dev eslint-plugin-haraka' and ensure it's in devDependencies.
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.
Ensure your .eslintrc uses 'extends: ["plugin:haraka/recommended"]' and the plugin is installed.