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

Commit

Permalink
Add rules to .flowconfig for flow strict rules (#2288)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mrkev authored and facebook-github-bot committed Jan 2, 2020
1 parent 4252469 commit f223799
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,17 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-8]\\|1[
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
module.name_mapper='ReactDOM' -> 'react-dom'

[strict]
deprecated-type
sketchy-null
unclear-type
unsafe-getters-setters
; Can't enable these- immutable.js raises errors
; untyped-import
; untyped-type-import
; Can't enable this one- getTextContentFromFiles requires invariant.
; The publicly-available fbjs version of invariant isn't flow strict.
; nonstrict-import

[version]
^0.110.1

0 comments on commit f223799

Please sign in to comment.