Registry / testing / eslint-plugin-ava

eslint-plugin-ava

JSON →
library16.0.1jsnpmunverified

An ESLint plugin providing lint rules for the AVA test runner. Current stable version is 16.0.1, released in 2025. It requires Node.js >=20.19 and ESLint >=10 with flat config (ESM-only). Key differentiators: bundled with XO, dedicated to AVA's test API (macros, hooks, assertions), and includes rules like no-conditional-assertion and prefer-t-regex that are specific to AVA's assertion style. Release cadence is irregular with major versions tied to AVA/ESLint breaking changes.

npm install eslint-plugin-ava
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-AVA
E
eslint-plugin-ava
testingjavascriptv16.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 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.
fix
Update 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.
fix
Upgrade 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.
fix
Upgrade 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.
fix
Migrate 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.
fix
Remove 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.
fix
Run 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.
fix
Use 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).
fix
Use 'ava/assertion-arguments': 'error' (string) instead of ['error'].
Upgrade
Version history
16.0.1latest on npm
Audit
Dependencies
eslintrequiredPeer dependency; requires ESLint >=10 for flat config
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-ava — npm install eslint-plugin-ava · libregistry