# ava/no-invalid-modifier-chain πŸ“ Disallow invalid modifier chains. πŸ’Ό This rule is enabled in the βœ… `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config). πŸ”§πŸ’‘ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions). Translations: [FranΓ§ais](https://github.com/avajs/ava-docs/blob/main/fr_FR/related/eslint-plugin-ava/docs/rules/no-invalid-modifier-chain.md) AVA only allows specific [test modifier](https://github.com/avajs/ava/blob/main/docs/01-writing-tests.md) chains. Using modifiers in the wrong order, combining incompatible modifiers, or using modifiers that don't apply to a given test type will cause runtime errors. ## Examples ```js import test from 'ava'; // Wrong order test.only.serial(t => {}); // ❌ test.serial.only(t => {}); // βœ… test.failing.serial(t => {}); // ❌ test.serial.failing(t => {}); // βœ… // Invalid combinations test.only.skip(t => {}); // ❌ // Invalid modifiers on hooks test.before.failing(t => {}); // ❌ test.before.only(t => {}); // ❌ test.before(t => {}); // βœ… // Invalid todo chains test.todo.failing('title'); // ❌ test.todo('title'); // βœ… // Invalid always usage test.before.always(t => {}); // ❌ `.always` only works with `after`/`afterEach` test.after.always(t => {}); // βœ… test.afterEach.always(t => {}); // βœ… // Unknown modifiers test.foo(t => {}); // ❌ test.cb(t => {}); // ❌ // Duplicates test.serial.serial(t => {}); // ❌ test.serial(t => {}); // βœ… ```