Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ import eslintPluginAva from 'eslint-plugin-ava'
✗ const eslintPluginAva = require('eslint-plugin-ava')
Package is ESM-only since v16.0.0; CommonJS require is not supported.
configs
✓ import { configs } from 'eslint-plugin-ava'
Named export for accessing config objects like recommended.
rules
✓ import { rules } from 'eslint-plugin-ava'
Named export to access individual rule definitions if needed.
flat config usage
✓ import eslintPluginAva from 'eslint-plugin-ava';
export default [{ plugins: { ava: eslintPluginAva }, rules: { 'ava/assertion-arguments': 'error' } }]
✗ module.exports = { plugins: ['ava'], rules: { 'ava/assertion-arguments': 'error' } }
Flat config is mandatory since v16.0.0; old .eslintrc style is not supported.
Minimal ESLint flat config for AVA rules using the recommended preset and custom overrides.
import eslintPluginAva from 'eslint-plugin-ava';
export default [
eslintPluginAva.configs.recommended,
{
rules: {
'ava/assertion-arguments': 'error',
'ava/no-only-test': 'error',
},
},
];
Debug
Known issues
breakingv16.0.0: Package is now pure ESM and requires Node.js >=20.19 and ESLint >=10 with flat config.fixUpdate to ESM (import, no require) and use ESLint flat config (eslint.config.js).
affects: >=16.0.0
breakingv15.0.0: Dropped support for Node.js <18 and ESLint <9.fixUpgrade to Node.js >=18 and ESLint >=9.
affects: >=15.0.0 <16.0.0
breakingv14.0.0: Dropped support for Node.js <14 and ESLint <8.fixUpgrade to Node.js >=14 and ESLint >=8.
affects: >=14.0.0 <15.0.0
breakingv16.0.0: Move to flat config only; .eslintrc style configs are no longer supported.fixMigrate to flat config as shown in the quickstart.
affects: >=16.0.0
deprecatedRules related to callback tests (test.cb()) are deprecated and removed in v13.0.0.fixRemove callback test patterns; use async tests instead.
affects: >=13.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'eslint-plugin-ava' declared in 'plugins': Cannot find module 'eslint-plugin-ava'
Missing npm install of eslint-plugin-ava.
fixRun npm install --save-dev eslint eslint-plugin-ava
Error: Failed to load plugin 'eslint-plugin-ava' declared in 'plugins': Package 'eslint-plugin-ava' is not ESM (use import instead of require)
Using CommonJS require() to load the ESM-only package.
fixUse import eslintPluginAva from 'eslint-plugin-ava' in an ESM context.
Error: .eslintrc.js: Configuration for rule 'ava/assertion-arguments' is invalid. Value ["error"] is not a valid severity.
Using array syntax for rule severity in flat config (should be string).
fixUse 'ava/assertion-arguments': 'error' (string) instead of ['error'].
Audit
Dependencies
eslintrequiredPeer dependency; requires ESLint >=10 for flat config