v0.273.0
·
34 commits
to main
since this release
Likely to cause new Flow errors:
- We are announcing Natural Inference for Flow, an improved way to infer types for primitive values, that resolves a long-standing correctness gap and source of confusion. See more in this post.
- Added
nested-hook
andnested-component
lint errors which detect nested hook or component syntax within component or hook syntax. This is on by default.
Notable bug fixes:
- For default imports, the autoimport ranking will now consider the names of the importing side. (e.g. Previously we completely ignored the name of
foo
inimport foo from './bar'
, but now we will count foo. If the pattern ofimport foo from './bar'
happens a lot, then the autoimport algorithm will be more likely to suggestimport foo from './bar'
rather thanimport bar from './bar'
). - Flow will infer a correct type when viewing the type of an object literal as a dictionary type. For example, the error in this try-Flow will be raised.
- Previously, we undercounted some imports during indexing, which causes autoimport ranking to behave incorrectly. The issue is now fixed.
- Flow will no longer emit
react-rule-hook-conditional
error for hooks called in a conditionally defined nested component.