Rules
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last month or quarter.
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last month or quarter.
No rules match “”.
Popular · 1 of 50
it('is false', () => {
// if this has a modifier (i.e. `not.toBeFalsy`), it would be considered fine
expect(a).toBeFalsy();
});
it('resolves', async () => {
// all uses of this modifier are disallowed, regardless of matcher
await expect(myPromise()).resolves.toBe(true);
});
describe('when an error happens', () => {
it('does not upload the file', async () => {
// all uses of this matcher are disallowed
expect(uploadFileMock).not.toHaveBeenCalledWith('file.name');
});
});The documentation shows no correct example for this rule.