{"id":19693,"library":"eslint-plugin-ava","title":"eslint-plugin-ava","description":"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.","status":"active","version":"16.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/avajs/eslint-plugin-ava","tags":["javascript","eslint","eslintplugin","eslint-plugin","ava","test","runner","assert","asserts","typescript"],"install":[{"cmd":"npm install eslint-plugin-ava","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-ava","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-ava","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; requires ESLint >=10 for flat config","package":"eslint","optional":false}],"imports":[{"note":"Package is ESM-only since v16.0.0; CommonJS require is not supported.","wrong":"const eslintPluginAva = require('eslint-plugin-ava')","symbol":"default","correct":"import eslintPluginAva from 'eslint-plugin-ava'"},{"note":"Named export for accessing config objects like recommended.","wrong":"","symbol":"configs","correct":"import { configs } from 'eslint-plugin-ava'"},{"note":"Named export to access individual rule definitions if needed.","symbol":"rules","correct":"import { rules } from 'eslint-plugin-ava'"},{"note":"Flat config is mandatory since v16.0.0; old .eslintrc style is not supported.","wrong":"module.exports = { plugins: ['ava'], rules: { 'ava/assertion-arguments': 'error' } }","symbol":"flat config usage","correct":"import eslintPluginAva from 'eslint-plugin-ava';\nexport default [{ plugins: { ava: eslintPluginAva }, rules: { 'ava/assertion-arguments': 'error' } }]"}],"quickstart":{"code":"import eslintPluginAva from 'eslint-plugin-ava';\n\nexport default [\n  eslintPluginAva.configs.recommended,\n  {\n    rules: {\n      'ava/assertion-arguments': 'error',\n      'ava/no-only-test': 'error',\n    },\n  },\n];","lang":"javascript","description":"Minimal ESLint flat config for AVA rules using the recommended preset and custom overrides."},"warnings":[{"fix":"Update to ESM (import, no require) and use ESLint flat config (eslint.config.js).","message":"v16.0.0: Package is now pure ESM and requires Node.js >=20.19 and ESLint >=10 with flat config.","severity":"breaking","affected_versions":">=16.0.0"},{"fix":"Upgrade to Node.js >=18 and ESLint >=9.","message":"v15.0.0: Dropped support for Node.js <18 and ESLint <9.","severity":"breaking","affected_versions":">=15.0.0 <16.0.0"},{"fix":"Upgrade to Node.js >=14 and ESLint >=8.","message":"v14.0.0: Dropped support for Node.js <14 and ESLint <8.","severity":"breaking","affected_versions":">=14.0.0 <15.0.0"},{"fix":"Migrate to flat config as shown in the quickstart.","message":"v16.0.0: Move to flat config only; .eslintrc style configs are no longer supported.","severity":"breaking","affected_versions":">=16.0.0"},{"fix":"Remove callback test patterns; use async tests instead.","message":"Rules related to callback tests (test.cb()) are deprecated and removed in v13.0.0.","severity":"deprecated","affected_versions":">=13.0.0"}],"env_vars":null,"search_vec":"'10':30 '16.0.1':20 '20.19':27 '2025':23 'api':47 'assert':50,58,70,93,94 'ava':4,13,44,68,90 'ava/eslint':81 'break':82 'bundl':39 'cadenc':73 'chang':83 'condit':57 'config':33 'current':16 'dedic':42 'differenti':38 'eslint':2,6,29,85,88 'eslint-plugin':87 'eslint-plugin-ava':1 'eslintplugin':86 'esm':35 'esm-on':34 'flat':32 'hook':49 'includ':52 'irregular':75 'javascript':84 'key':37 'like':54 'lint':9 'macro':48 'major':77 'no-conditional-assert':55 'node.js':26 'plugin':3,7,89 'prefer':61 'prefer-t-regex':60 'provid':8 'regex':63 'releas':21,72 'requir':25 'rule':10,53 'runner':15,92 'specif':66 'stabl':17 'style':71 'test':14,46,91 'tie':79 'typescript':95 'version':18,78 'xo':41","created_at":"2026-04-25T11:19:08.758087+00:00","updated_at":"2026-04-25T11:19:08.758087+00:00","problems":[{"fix":"Run npm install --save-dev eslint eslint-plugin-ava","cause":"Missing npm install of eslint-plugin-ava.","error":"Error: Failed to load plugin 'eslint-plugin-ava' declared in 'plugins': Cannot find module 'eslint-plugin-ava'"},{"fix":"Use import eslintPluginAva from 'eslint-plugin-ava' in an ESM context.","cause":"Using CommonJS require() to load the ESM-only package.","error":"Error: Failed to load plugin 'eslint-plugin-ava' declared in 'plugins': Package 'eslint-plugin-ava' is not ESM (use import instead of require)"},{"fix":"Use 'ava/assertion-arguments': 'error' (string) instead of ['error'].","cause":"Using array syntax for rule severity in flat config (should be string).","error":"Error: .eslintrc.js: Configuration for rule 'ava/assertion-arguments' is invalid. Value [\"error\"] is not a valid severity."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/avajs/eslint-plugin-ava","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-ava","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}