eslint-plugin-ava [](https://coveralls.io/github/avajs/eslint-plugin-ava?branch=main)

February 10, 2026 · View on GitHub

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

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';

export default [
	{
		plugins: {
			ava: eslintPluginAva,
		},
		rules: {
			'ava/assertion-arguments': 'error',
			'ava/no-only-test': 'error',
		},
	},
];

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 editor suggestions.
❌ Deprecated.

Name                     Description💼⚠️🚫🔧💡
assertion-argumentsEnforce passing correct arguments to assertions.🔧
failing-test-urlRequire a URL in a comment above test.failing().
hooks-orderEnforce test hook ordering.🔧
max-assertsLimit the number of assertions in a test.
no-async-fn-without-awaitRequire async tests to use await.💡
no-ava-in-dependenciesDisallow AVA in dependencies.🔧
no-commented-testsDisallow commented-out tests.
no-conditional-assertionDisallow assertions inside conditional statements.
no-duplicate-hooksDisallow duplicate hook declarations.
no-duplicate-modifiersDisallow duplicate test modifiers.🔧
no-identical-titleDisallow identical test titles.
no-ignored-test-filesDisallow tests in ignored files.
no-import-test-filesDisallow importing test files.
no-incorrect-deep-equalDisallow using deepEqual with primitives.🔧
no-inline-assertionsDisallow inline assertions.🔧
no-invalid-modifier-chainDisallow invalid modifier chains.🔧💡
no-negated-assertionDisallow negated assertions.🔧
no-nested-assertionsDisallow nested assertions.
no-nested-testsDisallow nested tests.
no-only-testDisallow test.only().💡
no-skip-assertDisallow skipping assertions.💡
no-skip-testDisallow skipping tests.💡
no-todo-implementationDisallow giving test.todo() an implementation function.💡
no-todo-testDisallow test.todo().💡
no-unknown-modifiersDisallow unknown test modifiers.💡
no-useless-t-passDisallow useless t.pass().
prefer-async-awaitPrefer async/await over returning a Promise.
prefer-power-assertEnforce using only assertions compatible with power-assert.
prefer-t-regexPrefer t.regex() over RegExp#test() and String#match().🔧
prefer-t-throwsPrefer t.throws() or t.throwsAsync() over try/catch.
require-assertionRequire that tests contain at least one assertion.
test-titleRequire tests to have a title.🔧
test-title-formatRequire test titles to match a pattern.
use-tRequire test functions to use t as their parameter.
use-t-throws-async-wellRequire t.throwsAsync() and t.notThrowsAsync() to be awaited.🔧
use-t-wellDisallow incorrect use of t.🔧
use-testRequire AVA to be imported as test.
use-true-falsePrefer t.true()/t.false() over t.truthy()/t.falsy().🔧

This plugin exports a recommended config that enforces good practices.

import eslintPluginAva from 'eslint-plugin-ava';

export default [
	...eslintPluginAva.configs.recommended,
];