What version of Oxlint are you using?
1.64.0
What command did you run?
No response
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
What happened?
The react/no-find-dom-node rule does not find a violation when the code is in .ts files, only in .tsx files. This differs from eslint where the rules could be configured to run against .ts files.
Seems like a change is needed to should_run() to check against non-jsx files?
demo.tsx
import React from 'react';
import ReactDOM from 'react-dom';
// oxlint WILL flag this file — .tsx triggers react plugin rules
class Demo extends React.Component {
foo() {
ReactDOM.findDOMNode(this); // react/no-find-dom-node fires here
}
}
demo.ts
import React from 'react';
import ReactDOM from 'react-dom';
// oxlint will NOT flag this file — react rules only apply to .tsx (JSX-capable) files
class Demo extends React.Component {
foo() {
ReactDOM.findDOMNode(this); // no oxlint violation here
}
}
What version of Oxlint are you using?
1.64.0
What command did you run?
No response
What does your
.oxlintrc.json(oroxlint.config.ts) config file look like?{ "plugins": ["react"], "rules": { "react/no-find-dom-node": "error" } }What happened?
The
react/no-find-dom-noderule does not find a violation when the code is in .ts files, only in .tsx files. This differs from eslint where the rules could be configured to run against .ts files.Seems like a change is needed to should_run() to check against non-jsx files?
demo.tsx
demo.ts