What version of Oxlint are you using?
1.58.0
What command did you run?
vp lint
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
vite.config.ts
import { defineConfig } from "vite-plus";
export default defineConfig({
lint: {
options: { typeAware: true, typeCheck: true },
plugins: ["jest", "vitest"],
rules: {
"jest/expect-expect": "error",
"vitest/warn-todo": "error",
},
},
});
What happened?
When test is imported from vite-plus/test instead of vitest, the Oxlint jest and vitest plugins do not recognize it as a test function, so the plugin rules silently do nothing.
See a reproduction here: https://github.com/dvanoni/vite-plus-test-lint-issue
import { test as vpTest } from "vite-plus/test";
import { test as vitestTest } from "vitest";
// ✗ Should error (jest/expect-expect) — but does NOT
vpTest(
"vite-plus/test does not have expected jest/expect-expect lint error",
() => {},
);
// ✗ Should error (vitest/warn-todo) — but does NOT
vpTest.todo(
"vite-plus/test does not have expected vitest/warn-todo lint error",
() => {},
);
// ✓ Correctly errors (jest/expect-expect)
vitestTest("vitest does have expected jest/expect-expect lint error", () => {});
// ✓ Correctly errors (vitest/warn-todo)
vitestTest.todo(
"vitest does have expected vitest/warn-todo lint error",
() => {},
);
What version of Oxlint are you using?
1.58.0
What command did you run?
vp lintWhat does your
.oxlintrc.json(oroxlint.config.ts) config file look like?vite.config.tsWhat happened?
When
testis imported fromvite-plus/testinstead ofvitest, the Oxlintjestandvitestplugins do not recognize it as a test function, so the plugin rules silently do nothing.See a reproduction here: https://github.com/dvanoni/vite-plus-test-lint-issue