When specifying this rule in .oxlintrc.json
"rules": {
"no-undef: "error"
}
And using this minimal code example:
export class Foo{
bar: notDefined;
}
const t = r + 1;
This causes a failure to identify that r is an undefined variable. Note that the notDefined type was never defined.
Observations:
This bug only appears to arise when using a type annotation on a class member in which the annotated type was not defined. Moving this code outside of the class definition does not trigger the bug.
Running oxlint from the terminal catches this error, but the oxc plugin does not.