Skip to content

v0.273.0

Compare
Choose a tag to compare
@facebook-github-bot facebook-github-bot released this 06 Jun 20:00
· 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 and nested-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 in import foo from './bar', but now we will count foo. If the pattern of import foo from './bar' happens a lot, then the autoimport algorithm will be more likely to suggest import foo from './bar' rather than import 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.