Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit f223799

Browse files
mrkevfacebook-github-bot
authored andcommitted
Add rules to .flowconfig for flow strict rules (#2288)
Summary: Internally at facebook, we use `flow strict` to define certain rules that make our codebase more reliable. I just noticed the .flowconfig for this repo doesn't include rules for `flow strict`. We do have files in the repo annotated with strict flow, so lets configure it to get the benefits. Unfortunatley, there's 3 rules we have enabled internally which we can't use in the repo as it exists today. I put the necessary info as a comment on the .flowconfig itself. npm run flow -> no errors. Pull Request resolved: #2288 Differential Revision: D19265177 Pulled By: mrkev fbshipit-source-id: 0eca719027d62c2681cd09be03385ba53a27c2e3
1 parent 4252469 commit f223799

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/.flowconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,17 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-8]\\|1[
3737
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
3838
module.name_mapper='ReactDOM' -> 'react-dom'
3939

40+
[strict]
41+
deprecated-type
42+
sketchy-null
43+
unclear-type
44+
unsafe-getters-setters
45+
; Can't enable these- immutable.js raises errors
46+
; untyped-import
47+
; untyped-type-import
48+
; Can't enable this one- getTextContentFromFiles requires invariant.
49+
; The publicly-available fbjs version of invariant isn't flow strict.
50+
; nonstrict-import
51+
4052
[version]
4153
^0.110.1

0 commit comments

Comments
 (0)