From f622fcd9a0e23699e7359fdcc5fc6eff9cda9ebc Mon Sep 17 00:00:00 2001 From: Pascal Duez Date: Sun, 14 May 2017 18:09:51 +0200 Subject: [PATCH] docs: update no-types-missing-file-annotation case samples (#229) --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38f36510..025438d0 100644 --- a/README.md +++ b/README.md @@ -1035,7 +1035,7 @@ type x = MyBoolean ### no-types-missing-file-annotation -Disallows Flow type imports, aliases, and annotations in files missing a valid Flow file declaration (or a @noflow annotation). +Disallows Flow type imports, exports, aliases, and annotations in files missing a valid Flow file declaration (or a @noflow annotation). ```js { @@ -1063,6 +1063,9 @@ import type {A} from "a" import {type A} from "a" // Message: Type imports require valid Flow declaration. +export type {A} from "a" +// Message: Type exports require valid Flow declaration. + function t(): T{} // Message: Type annotations require valid Flow declaration. ``` @@ -1084,6 +1087,9 @@ import type A from "a" /* @noflow */ import {type A} from "a" + +/* @noflow */ +export type {A} from "a" ``` @@ -3732,4 +3738,3 @@ function x(i: Y) { i }; type A = {}; x() **Deprecated** Babylon (the Babel parser) v6.10.0 fixes parsing of the invalid syntax this plugin warned against. Checks for simple Flow syntax errors. -