Install flow type definitions from Jest by default or suggest it
See original GitHub issueI think the suggested flow config should also include the following line:
[libs]
/flow-typed/
So that flow will recognize the definitions if you run:
flow-typed install jest -f 0.30
It would be helpful to add some info in the README about this process of adding type definitions to the project. Maybe the type definition of Jest could actually be added by default?
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Running Jest tests with Flow typed Javascript files
This will be a simple tutorial about running Jest tests with Flow typed Javascript files in NodeJS project.
Read more >What's the right way to write Jest tests verified with Flow?
1.Install flow to your project. If you use create-reat-app, here is a guide for this step. yarn add -D flow-bin yarn run flow...
Read more >Library Definitions | Flow
We recommend checking out the flow-typed tool and repository , which helps you quickly find and install pre-existing libdefs for your third-party dependencies....
Read more >Configuring Jest
Configuring Jest. The Jest philosophy is to work great by default, but sometimes you just need more configuration power.
Read more >TypeScript | WebStorm Documentation - JetBrains
In the TypeScript field, specify the version of the TypeScript to use (WebStorm displays the currently chosen version). By default, the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There’s no need for config here (I’ve never felt so proud!) –
<PROJECT_ROOT>/flow-typed
is already a default[libs]
dir in Flow.So as long as that directory exists, any
.js
files in it are considered libdefs even without a[libs]
section in the .flowconfig.The Flow team has plans for a
flow-typed install
command that will automatically install libdefs for all of your dependencies and stub the ones that do not have libdefs. So this workflow will be improved in the future not just for Jest but for everything.In the meantime it might make sense for create-react-app to ship with a [lib] directory with all of the dependencies that create-react-app adds by default. Then can be added to a
.flowconfig
fairly easily.cc @jeffmo