What version of Oxlint are you using?
1.62.0
What command did you run?
oxlint
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
What happened?
We have a number of tests where the assertion is defined in a helper function and Oxlint is flagging it as an error.
const assertFn = (a, b) => {
expect(a).toBe(b); // No error
};
const assertions = {
assertFn: (a, b) => {
expect(a).toBe(b); // Oxc Error: `expect` must be inside of a test block.
}
};
test('test', () => {
assertFn(1, 1);
assertions.assertFn(1, 1);
});
Playground repro
What version of Oxlint are you using?
1.62.0
What command did you run?
oxlint
What does your
.oxlintrc.json(oroxlint.config.ts) config file look like?{ "plugins": ["jest"], "categories": { "correctness": "off" }, "rules": { "jest/no-standalone-expect": "error" } }What happened?
We have a number of tests where the assertion is defined in a helper function and Oxlint is flagging it as an error.
Playground repro