eslint-plugin-rut package as a dev dependency.
Once installed, add the recommended config to your
.eslintrc.js file. By default this will target
all test files using ESLint overrides in the format of
If you prefer to manage the targets yourself, something like the following will suffice.
Verify and enforce the correct event types are used when mocking or dispatching events.
Disallow usage of React's
act() within tests. This functionality is provided by Rut and shouldn't
Disallow import and usage of Rut's internal APIs. Accessing these directly is a code smell.
Require TypeScript generics for
Does not apply to host (DOM) elements.