github facebook/flow v0.153.0

latest releases: v0.238.3, v0.238.2, v0.238.1...
3 years ago

Likely to cause new Flow errors:

New Features:

  • You can require an exhaustive check of an enum in a switch statement that includes a default branch. This is enabled with the comment // flowlint-next-line require-explicit-enum-switch-cases:error.
  • Autocomplete for object keys.
  • Introduce a flow fix command to apply autofixes from the command line to a list of files.
  • Enable a new check mode that uses significantly less RAM for large projects.

Notable bug fixes:

  • Fix a bug that allowed nested anonymous functions inside a default export.
  • Using the --ignore-version flag also prevents Flow from crashing when an invalid option is in the .flowconfig.

Library Definitions:

  • Support the options parameter for require.resolve. (thanks @skeggse)
  • Return a TypedArray instead of void from TypedArray sort function. (thanks @goodmind)
  • Return a DOMStringList instead of a string array from IDBDatabase.objectStoreNames. (thanks @bnelo12)

Misc:

  • Add --binary to the flow version command to see the path to the current binary.
  • Prevent the LSP from exiting when an invalid option is in the .flowconfig.
  • Autofix for a method-unbinding error to replace the method with an arrow function.
  • Autofix for a class-object-subtyping error to replace the object type with an interface.

Don't miss a new flow release

NewReleases is sending notifications on new releases.