[eslint] Turn off validations

We're seeing false positives
This commit is contained in:
Sathya Gunasekaran
2023-11-14 16:59:09 +00:00
parent 3da32312e7
commit 1641f94a86
2 changed files with 5 additions and 16 deletions
@@ -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
@@ -62,10 +62,7 @@ const COMPILER_OPTIONS: Partial<PluginOptions> = {
compilationMode: "infer",
panicThreshold: "CRITICAL_ERRORS",
environment: {
validateHooksUsage: true,
validateFrozenLambdas: false,
validateRefAccessDuringRender: true,
validateNoSetStateInRender: true,
validateHooksUsage: false,
},
};