prefer-hooks-in-order
UnreleasedConfiguration
rslint.config.ts
Rule Details
Requires lifecycle hooks to appear in the order Rstest runs them: beforeAll, beforeEach, afterEach, then afterAll. Keeping declarations in runtime order makes test setup easier to read.
The rule checks consecutive hook declarations. A non-hook call begins a new sequence, allowing separate setup groups when needed.