Files
oxc-project__oxc/crates/oxc_react_compiler/fixtures/default-suppression-eslint-block-range.js
Boshen 4b81f4d963 fix(react_compiler): honor default suppressions (#24747)
Honor Babel React Compiler 1.0.0's default ESLint and Flow suppression bailouts even when validation flags are enabled.

Validation:
- `cargo test -p oxc_react_compiler`
- `cargo clippy -p oxc_react_compiler --all-targets -- -D warnings`
- Direct fixture comparison with `babel-plugin-react-compiler@1.0.0`

Caveat: Babel 1.0.0 treats block disables as open-ended; this change preserves that behavior.

AI-assisted.
2026-07-21 07:02:25 +00:00

7 lines
189 B
JavaScript

/* eslint-disable react-hooks/rules-of-hooks */
function Component({ value }) {
const doubled = value * 2;
return <div>{doubled}</div>;
}
/* eslint-enable react-hooks/rules-of-hooks */