What version of Oxlint are you using?
1.51.0
What command did you run?
No response
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
What happened?
import type { Foo } from "./foo"; // lint error
import { foo } from "./foo"; // lint error
import "./foo"; // <----- no lint error
import type { Bar } from "./bar"; // lint error
import { bar } from "./bar"; // lint error
import "./bar"; // lint error
In this example, all "bar" related imports are properly flagged by the group: ["bar"] pattern, but for the "foo" related imports, only the first two are matched by regex: "foo" pattern. The foo side-effect import is not matched.
Reproduction: https://github.com/oleasteo/repro-oxlint-no-restricted-imports
{ "plugins": ["eslint"], "categories": { "correctness": "off" }, "rules": { "eslint/no-restricted-imports": ["error", { "patterns": [ {"regex": "foo", "message": "no foo allowed (regex match)"}, {"group": ["bar"], "message": "no bar allowed (group match)"} ]}], }, }