{"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,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}