Upgrading to Flow .69, starting @flow strict annotations

Summary:
Release notes: None

Upgraded to Flow .69
Added [strict] section to .flowconfig
Started going strict with a simple file

The Flow team suggests to do this on a file-by-file basis,
instead of doing it on a rule-by-rule basis.
Closes https://github.com/facebook/prepack/pull/1692

Differential Revision: D7478479

Pulled By: NTillmann

fbshipit-source-id: b279f6b3a350cc70c263b693522016a20fc8d5d7
This commit is contained in:
Nikolai Tillmann 2018-04-02 22:23:16 -07:00 committed by Facebook Github Bot
parent 7164da4c4a
commit 4d8b90a94e
4 changed files with 15 additions and 6 deletions

View File

@ -19,3 +19,12 @@ suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
module.name_mapper='/lib/' -> '/src/'
[strict]
nonstrict-import
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import
sketchy-null

View File

@ -91,7 +91,7 @@
"eslint-plugin-flowtype": "^2.20.0",
"eslint-plugin-header": "^1.0.0",
"eslint-plugin-prettier": "^2.1.2",
"flow-bin": "^0.68.0",
"flow-bin": "^0.69.0",
"flow-typed": "^2.3.0",
"graceful-fs": "^4.1.11",
"invariant": "^2.2.0",

View File

@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
/* @flow */
/* @flow strict */
import type { BabelNodeSourceLocation } from "babel-types";
@ -37,7 +37,7 @@ export class CompilerDiagnostic extends Error {
// built-in super classes.
export class FatalError extends Error {
constructor(message?: string) {
super(message || "A fatal error occurred while prepacking.");
super(message === undefined ? "A fatal error occurred while prepacking." : message);
}
}

View File

@ -3653,9 +3653,9 @@ flow-bin@^0.28.0:
bin-wrapper "^3.0.2"
logalot "^2.0.0"
flow-bin@^0.68.0:
version "0.68.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.68.0.tgz#86c2d14857d306eb2e85e274f2eebf543564f623"
flow-bin@^0.69.0:
version "0.69.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.69.0.tgz#053159a684a6051fcbf0b71a2eb19a9679082da6"
flow-parser@^0.*:
version "0.66.0"