ESLint plugin providing rules for AdonisJS applications and addons, maintained by the AdonisJS community. Current stable version is 3.0.3 (released 2023-06-13), release cadence is irregular. Features TypeScript support and is designed for AdonisJS 5+ with ESM modules. v3 major release targets ESM and updated coding style; v2.x supports ESLint 8. Differentiates from generic ESLint configs by providing AdonisJS-specific conventions like Edge template rules, Lucid ORM usage, and Ace commands.
npm install eslint-plugin-adonisVerified import paths — ran on the pinned version, not inferred.
Example ESLint configuration using adonis plugin with common and TypeScript presets, showing rule customization.
Switch to ESM by adding 'type': 'module' in package.json and using import syntax in .eslintrc.cjs or .eslintrc.js.
Use the base 'unicorn/no-array-for-each' rule directly (requires eslint-plugin-unicorn).
Update to v3.0.2+ which uses 'unicorn/prefer-number-properties' prefix.
Update ESLint to version 8 or higher.
Run 'npm install eslint@8' and update config files.
Run 'npm install --save-dev eslint-plugin-adonis' from project root.
Use object format: 'adonis/no-unused-vars': ['warn'] or set to 'off'.
Set parserOptions.ecmaVersion: 2020 (or higher) and sourceType: 'module'.
Add 'plugins: ['adonis']' to ESLint config.
Update to v3.0.3+ or install eslint-plugin-unicorn if you need that specific rule.