Skip to content

Commit

Permalink
Move flow-typed definitions to repo root (#37636)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #37636

Moves `flow-typed/` directory from `packages/react-native/flow-typed/` to the repo root.

- This is a more suitable location for `flow-typed` definitions for 3P dependencies to be used across React Native packages.
- **Breaking**: We no longer publish these 3P libdefs as part of the `react-native` package (assuming that external use of React Native with Flow is extremely rare, and that these projects can manage their own package libdefs).

Changelog:
[General][Breaking] Remove included `flow-typed/` directory from the `react-native` package

- **Upgrade instructions**: Projects using Flow should install or replicate third party `flow-typed` definitions for React Native dependencies — see https://github.com/facebook/react-native/tree/main/flow-typed and [#37636](#37636).

Reviewed By: hoxyq

Differential Revision: D46313482

fbshipit-source-id: 3d97d5408e44dd43132664c4933f3ff1075f90a1
  • Loading branch information
huntie authored and facebook-github-bot committed Jun 7, 2023
1 parent 84200fe commit 4540668
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 12 deletions.
17 changes: 8 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ module.exports = {
'no-undef': 0,
},
},

{
files: ['flow-typed/**/*.js'],
rules: {
'lint/valid-flow-typed-signature': 2,
'no-unused-vars': 0,
quotes: 0,
},
},
{
files: ['packages/react-native/Libraries/**/*.js'],
rules: {
Expand All @@ -46,14 +53,6 @@ module.exports = {
'lint/sort-imports': 1,
},
},
{
files: ['packages/react-native/flow-typed/**/*.js'],
rules: {
'lint/valid-flow-typed-signature': 2,
'no-unused-vars': 0,
quotes: 0,
},
},
{
files: [
'**/__fixtures__/**/*.js',
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
.*/node_modules/.*

[libs]
flow-typed/
packages/react-native/interface.js
packages/react-native/flow/
packages/react-native/flow-typed/

[options]
enums=true
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
.*/node_modules/.*

[libs]
flow-typed/
packages/react-native/interface.js
packages/react-native/flow/
packages/react-native/flow-typed/

[options]
enums=true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"build.gradle.kts",
"cli.js",
"flow",
"flow-typed",
"gradle.properties",
"index.js",
"interface.js",
Expand Down

0 comments on commit 4540668

Please sign in to comment.