{"id":25509,"library":"eslint-plugin-eta-3","title":"eslint-plugin-eta-3","description":"An ESLint plugin that lints Eta v3 template files. Version 3.0.1 is current and stable, with a low release cadence. It processes .eta files through a custom processor, enabling ESLint rules on Eta templates. Key differentiators: built specifically for Eta v3, supports JavaScript-like syntax inside templates, and integrates seamlessly with standard ESLint workflows. Alternatives like eslint-plugin-eta target older Eta versions. Requires ESLint >=8 and eta >=3 as peer dependencies.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","eslint","eslintplugin"],"install":[{"cmd":"npm install eslint-plugin-eta-3","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-eta-3","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-eta-3","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin functionality","package":"eslint","optional":false},{"reason":"peer dependency required for template processing","package":"eta","optional":false}],"imports":[{"note":"CommonJS require is idiomatic; there is no named export for the plugin object.","wrong":"import { eta3Plugin } from 'eslint-plugin-eta-3';","symbol":"plugin (as object)","correct":"const eta3Plugin = require('eslint-plugin-eta-3');"},{"note":"The processor is referenced as a string path in ESLint config, not imported.","wrong":"import { EtaProcessor } from 'eslint-plugin-eta-3';","symbol":"Processor","correct":"// Not directly exported; use 'eta-3/eta' in ESLint config"},{"note":"ESLint expects the short name without the 'eslint-plugin-' prefix.","wrong":"plugins: [\"eslint-plugin-eta-3\"]","symbol":"Plugin name","correct":"plugins: [\"eta-3\"]"}],"quickstart":{"code":"// Install\nnpm install --save-dev eslint eslint-plugin-eta-3 eta@^3\n\n// .eslintrc.js\nmodule.exports = {\n  root: true,\n  env: { browser: true, es2021: true },\n  plugins: [\"eta-3\"],\n  overrides: [\n    {\n      files: [\"*.eta\"],\n      processor: \"eta-3/eta\",\n      rules: {\n        // Example rules\n        \"no-unused-vars\": \"error\",\n        \"no-undef\": \"error\"\n      }\n    }\n  ]\n};\n\n// Example Eta template: template.eta\n// <% let name = \"World\" %>\n// <h1>Hello <%= name %></h1>\n\n// Run linter\nnpx eslint template.eta","lang":"javascript","description":"Shows installation, plugin and processor configuration for ESLint, and an example template to lint."},"warnings":[{"fix":"Ensure eta package is version 3.x.","message":"Plugin only works with Eta v3; using with other versions may break.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"In ESLint config, use processor: 'eta-3/eta'.","message":"Named export for processor is not available; must use string path.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Upgrade ESLint to version 8 or higher.","message":"Plugin requires ESLint >=8; older versions are incompatible.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Use files: ['*.eta'] (not '.eta' or '**/*.eta').","message":"Overrides with files pattern must match .eta extension exactly.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev eslint-plugin-eta-3","cause":"Package not installed or missing from node_modules.","error":"Error: Failed to load plugin 'eta-3' declared in '.eslintrc': Cannot find module 'eslint-plugin-eta-3'"},{"fix":"Run npm install eta@^3","cause":"Missing peer dependency eta.","error":"Error: Cannot find module 'eta'"},{"fix":"In ESLint config, use processor: 'eta-3/eta' under the override.","cause":"Processor reference 'eta-3/eta' is incorrect or missing.","error":"TypeError: Cannot read properties of undefined (reading 'eta')"},{"fix":"Ensure ESLint version is 8.x; check rule documentation.","cause":"ESLint version mismatch; rules may have changed in newer ESLint.","error":"Warning: Rule 'no-unused-vars' severity 'error' has unknown options"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}