diff --git a/compiler/packages/eslint-plugin-react-forget/__tests__/ReactForgetDiagnostics-test.ts b/compiler/packages/eslint-plugin-react-forget/__tests__/ReactForgetDiagnostics-test.ts index d42e4ac051..425004f4cf 100644 --- a/compiler/packages/eslint-plugin-react-forget/__tests__/ReactForgetDiagnostics-test.ts +++ b/compiler/packages/eslint-plugin-react-forget/__tests__/ReactForgetDiagnostics-test.ts @@ -79,9 +79,9 @@ const tests: ForgetTestCases = { } `, }, - ], - invalid: [ { + // TODO(gsn): Move this to invalid test suite, when we turn on + // validateRefAccessDuringRender validation name: "[InvalidInput] Ref access during render", code: normalizeIndent` function Component(props) { @@ -90,17 +90,9 @@ const tests: ForgetTestCases = { return value; } `, - errors: [ - { - message: - "[ReactForget] Ref values (the `current` property) may not be accessed during render. (https://react.dev/reference/react/useRef)", - line: 5, - column: 10, - endColumn: 15, - endLine: 5, - }, - ], }, + ], + invalid: [ { name: "[InvalidReact] ESlint suppression", // Indentation is intentionally weird so it doesn't add extra whitespace diff --git a/compiler/packages/eslint-plugin-react-forget/src/rules/ReactForgetDiagnostics.ts b/compiler/packages/eslint-plugin-react-forget/src/rules/ReactForgetDiagnostics.ts index 22194fee4e..c42a25e34b 100644 --- a/compiler/packages/eslint-plugin-react-forget/src/rules/ReactForgetDiagnostics.ts +++ b/compiler/packages/eslint-plugin-react-forget/src/rules/ReactForgetDiagnostics.ts @@ -62,10 +62,7 @@ const COMPILER_OPTIONS: Partial = { compilationMode: "infer", panicThreshold: "CRITICAL_ERRORS", environment: { - validateHooksUsage: true, - validateFrozenLambdas: false, - validateRefAccessDuringRender: true, - validateNoSetStateInRender: true, + validateHooksUsage: false, }, };