github facebook/flow v0.273.0

latest releases: v0.294.0, v0.293.0, v0.292.0...
6 months ago

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.

Don't miss a new flow release

NewReleases is sending notifications on new releases.