[compiler] Enable validateNoVoidUseMemo in eslint & playground (#34022)
Enables `validateNoVoidUseMemo` by default only in eslint (it defaults to false otherwise) as well as the playground.
lauren committed
Jul 28, 2025 at 13:42 UTC
7ee7571212bc02354b852752a98b23bc90546fdf
3 files changed
+3
compiler/apps/playground/components/Editor/EditorImpl.tsx
+1
@@ -219,6 +219,7 @@ function compile(
219
validateNoImpureFunctionsInRender: true,
220
validateStaticComponents: true,
221
validateNoFreezingKnownMutableFunctions: true,
222
+ validateNoVoidUseMemo: true,
223
}
224
: {
225
/* use defaults for compiler mode */
compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts
+1
@@ -108,6 +108,7 @@ const COMPILER_OPTIONS: Partial<PluginOptions> = {
108
validateNoImpureFunctionsInRender: true,
109
validateStaticComponents: true,
110
validateNoFreezingKnownMutableFunctions: true,
111
+ validateNoVoidUseMemo: true,
112
}),
113
};
114
packages/eslint-plugin-react-hooks/src/rules/ReactCompiler.ts
+1
@@ -110,6 +110,7 @@ const COMPILER_OPTIONS: Partial<PluginOptions> = {
110
validateNoImpureFunctionsInRender: true,
111
validateStaticComponents: true,
112
validateNoFreezingKnownMutableFunctions: true,
113
+ validateNoVoidUseMemo: true,
114
}),
115
};
116