An ESLint plugin so you can lint Eta template files (forked from bgub/eslint-plugin-eta)
npm install @jeffcaradona/eslint-plugin-eta> Lint your embeddable Eta templates with ease
> Note: CommonJS support is planned for v0.3.0. Currently, this plugin is ESM-only. If you need CommonJS support, please pin to a release that includes dual-module support, or use ESM in your project.
npm install --save-dev @jeffcaradona/eslint-plugin-eta to install this ESLint plugin.#### ESM (Recommended)
Add this to your eslint.config.js:
``javascript
import eta from '@jeffcaradona/eslint-plugin-eta'
export default [
{
files: ['*/.eta'],
plugins: {
eta
},
processor: 'eta/eta'
}
]
`
#### CommonJS (v0.3.0+)
> Available in v0.3.0 and later
Add this to your eslint.config.cjs:`javascript
const eta = require('@jeffcaradona/eslint-plugin-eta')
module.exports = [
{
files: ['*/.eta'],
plugins: {
eta
},
processor: 'eta/eta'
}
]
`
| Node Version | ESLint 9 | Eta v1-v4 |
|--------------|----------|-----------|
| 18.18.0 | ✅ | ✅ |
| 20.x | ✅ | ✅ |
| 24.x | ✅ | ✅ |
If you're getting module resolution errors:
1. Ensure ESLint 9.x is installed: npm list eslinteslint.config.js
2. Check Node.js version: Must be 18.18.0 or higher
3. Use flat config: ESLint 9 requires (not .eslintrc.js)
Run the full test suite to verify compatibility:
`bash``
npm run test:prod
Test output includes linting, coverage, and all integration tests.
See CHANGELOG.md for version history and planned features.
For development setup, see the documentation folder.