-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow] perform call check on Array [react-rule-unsafe-mutation] errors
Summary: In ``` component Foo(arr: Array<number>) { arr.sort((a: number, b: number) => { return 1; }); return null; } ``` the call to `.sort` is an error, but we should still try to populate some type in the entry for `sort`. This diff makes it so that right after we raise the EPropNotReadable ReactDeepReadOnly error we perform the call as usual. Changelog: [errors] Flow will now perform a complete function call check even when [react-rule-unsafe-mutation] errors are raised. Reviewed By: SamChou19815 Differential Revision: D67320626 fbshipit-source-id: fc2c3df9661f43739c405103f59bd57870c0e2c8
- Loading branch information
1 parent
54f9bee
commit 1a33f6b
Showing
6 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ | |
[options] | ||
all=true | ||
no_flowlib=false | ||
component_syntax=true | ||
|
||
[strict] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
component Foo(arr: Array<number>) { | ||
arr.sort((a: number, b: number) => { | ||
return 1; | ||
}); | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters