eslint-plugin-ava
ESLint rules for AVA
Translations: Français
This plugin is bundled in XO . No need to do anything if you're using it.
Propose or contribute a new rule ➡
Install
npm install --save-dev eslint eslint-plugin-ava copy
Requires ESLint >=10, flat config , and ESM .
Usage
Use a preset config or configure each rule in eslint.config.js.
import eslintPluginAva from 'eslint-plugin-ava' ;
import {defineConfig} from 'eslint/config' ;
export default defineConfig ([
{
plugins: {
ava: eslintPluginAva,
},
rules: {
'ava/assertion-arguments' : 'error' ,
'ava/no-only-test' : 'error' ,
},
},
]); copy
Rules
The rules will only activate in test files.
💼 Configurations enabled in.
⚠️ Configurations set to warn in.
🚫 Configurations disabled in.
✅ Set in the recommended configuration .
🔧 Automatically fixable by the --fix CLI option .
💡 Manually fixable by .
❌ Deprecated.
Recommended config
This plugin exports a recommended config that enforces good practices.
import eslintPluginAva from 'eslint-plugin-ava' ;
import {defineConfig} from 'eslint/config' ;
export default defineConfig ([
... eslintPluginAva.configs.recommended,
]); copy
eslint-node-test — ESLint rules for the Node.js built-in test runner.