ESLint plugin to lint JavaScript inside ERB files (.js.erb) and optionally HTML inside .html.erb using html-eslint. Version 2.1.1 is current, actively maintained with monthly releases. Key differentiator: zero-dependency, supports ESLint flat config (v9+), handles ERB tags (<% %>, <%= %>) inside JS code, and provides recommended configs. Unlike generic processors, it also fixes autofix interactions with stylistic rules (e.g., quotes). The plugin requires explicitly disabling `reportUnusedDisableDirectives` to avoid false positives.
npm install eslint-plugin-erbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Set up ESLint with eslint-plugin-erb using flat config and lint a .js.erb file, showing how ERB tags are ignored.
Use erb.configs.recommended in flat config, or switch to erb.configs['recommended-legacy'] for .eslintrc.*.
Migrate to flat config (eslint.config.js) and use erb.configs.recommended.
Add `linterOptions: { reportUnusedDisableDirectives: 'off' }` to your ESLint config.Either use eslint.config.js with erb.configs.recommended or downgrade to v1.x.
Wrap linterOptions inside a configuration object: `{ linterOptions: { reportUnusedDisableDirectives: 'off' } }`.Install with `npm install --save-dev eslint-plugin-erb` and ensure ESLint is v9+.
Add `processor: erb.processors.processorJs` to your config or use `erb.configs.recommended`.
No dependency data recorded yet.