@samitouri / QOS-React-1 / commits / 88b40f6e41

Enable ref validation in linter (#34044)

--- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34044). * #34027 * __->__ #34044

Joseph Savona committed Jul 29, 2025 at 12:30 UTC 88b40f6e41004773f19d37827980c66a8cf1865b
2 files changed +2 -2
compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts
+1 -1
@@ -101,7 +101,7 @@ const COMPILER_OPTIONS: Partial<PluginOptions> = {
101 // Don't emit errors on Flow suppressions--Flow already gave a signal
102 flowSuppressions: false,
103 environment: validateEnvironmentConfig({
104 - validateRefAccessDuringRender: false,
104 + validateRefAccessDuringRender: true,
105 validateNoSetStateInRender: true,
106 validateNoSetStateInEffects: true,
107 validateNoJSXInTryStatements: true,
packages/eslint-plugin-react-hooks/src/rules/ReactCompiler.ts
+1 -1
@@ -103,7 +103,7 @@ const COMPILER_OPTIONS: Partial<PluginOptions> = {
103 // Don't emit errors on Flow suppressions--Flow already gave a signal
104 flowSuppressions: false,
105 environment: validateEnvironmentConfig({
106 - validateRefAccessDuringRender: false,
106 + validateRefAccessDuringRender: true,
107 validateNoSetStateInRender: true,
108 validateNoSetStateInEffects: true,
109 validateNoJSXInTryStatements: true,