Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #281
There are currently 59 errors remaining to be fixed for Flow pass weak checks. The vast majority of these are for required modules which do not have a publicly available declaration that I can find.
I pushed this up so you can make some decisions to get this passing and get some help since my time is limited right now and there's a lot of errors to fix. I'm open to anything on moving forward. It may make sense to create a branch in gatsby and we merge this to there.
There are two main resources for type definitions - iflow (which is slowly being deprecated in favor of...) flow-typed. Flow-typed is the new hawtness and official. It uses a CLI to do some really great stuff. Sadly, both are lacking in the number of libraries covered.
For anything not covered, you have to either suppress the warning or "fix" it with your own declaration. These are under interfaces and are covered in the docs https://flowtype.org/docs/third-party.html#_
The declarations can be as good or bad as you want to make them, i.e. they can actually cover pieces of the API you use or they can default to very broad :any or empty object return declarations from what I can surmise.
The other issues are mainly around not having types yet for what is returned by build-pages (wrappers in particular). This could be a good segue into nailing down that interface for that refactor.
And the best part is once you fix some of these Flow will likely find some more. :)
I also added flow ESLint warnings which would be required for flow to run without the weak setting. Running
flow suggest
for a file will usually give you the first bit of tips for resolving these.