In the official examples they always have /* @flow */
at the top of the page. Now that's nice and helpful for an existing project, where I want to opt-in to flow for each file. Building a new project from scratch I would like to just have flow type checking everywhere, without having to type /* @flow */
every time. Is it possible?
Assuming you have a .flowconfig
or you can make one, you can add
[options]
all=true
in there.
Note that this is literally all files, so that will also include random files in node_modules
. Another alternative would be to use @flow
and just use a lint rule like require-valid-file-annotation
for ESLint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With