chore: begin adding strict flow types to lint rule #34
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.
I mentioned this in #33, but I figured I'd get the ball rolling and show what it can look like.
These types allow us to strictly type the lint rules so that they
So far I've only migrated one lint rule fully (
noWeakTypes
) just as an example.This PR should be "CI complete", so we could land this with the intention of fully typing the entire codebase if that's something we were interested in.
This PR also switches to
hermes-eslint
(as per #33).cc @mrtnzlml
For context - adding strict types to rules is a HUGE win for contributors as they need to think less. I've found that it greatly reduces the barrier to entry (thanks to autocomplete and flow protecting against bugs early), and lessens the time spent reviewing changes (as many sanity checks are done by flow).