mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[eslint] Turn off validations
We're seeing false positives
This commit is contained in:
+4
-12
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user