What version of Oxlint are you using?
1.6.1
What command did you run?
oxlint
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
export default defineConfig({
plugins : [ "react" ],
rules: {
"react/display-name": "error"
}
})
What happened?
The rule produces false errors for exported, default classes which extend React.Component
The below code produces false errors. There are no current tests cases that cover this case.
export default class Logo extends React.Component<Props> {
public url = "/imgs/image.png?cache=true";
public render(): React.ReactNode {
return (
<Link to="/" onClick={this.props.onClick} id="logo">
<img
src={CDN(this.url)}
height="25"
/>
</Link>
);
}
}
This code is accepted by the rule
class Logo extends React.Component<Props> {
public url = "/imgs/image.png?cache=true";
public render(): React.ReactNode {
return (
<Link to="/" onClick={this.props.onClick} id="logo">
<img
src={CDN(this.url)}
height="25"
/>
</Link>
);
}
}
export default Logo;
What version of Oxlint are you using?
1.6.1
What command did you run?
oxlintWhat does your
.oxlintrc.json(oroxlint.config.ts) config file look like?What happened?
The rule produces false errors for exported, default classes which extend React.Component
The below code produces false errors. There are no current tests cases that cover this case.
This code is accepted by the rule