Skip to content

Commit f622fcd

Browse files
pascalduezgajus
authored andcommitted
docs: update no-types-missing-file-annotation case samples (gajus#229)
1 parent a74fd9e commit f622fcd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ type x = MyBoolean
10351035
<a name="eslint-plugin-flowtype-rules-no-types-missing-file-annotation"></a>
10361036
### <code>no-types-missing-file-annotation</code>
10371037

1038-
Disallows Flow type imports, aliases, and annotations in files missing a valid Flow file declaration (or a @noflow annotation).
1038+
Disallows Flow type imports, exports, aliases, and annotations in files missing a valid Flow file declaration (or a @noflow annotation).
10391039

10401040
```js
10411041
{
@@ -1063,6 +1063,9 @@ import type {A} from "a"
10631063
import {type A} from "a"
10641064
// Message: Type imports require valid Flow declaration.
10651065

1066+
export type {A} from "a"
1067+
// Message: Type exports require valid Flow declaration.
1068+
10661069
function t<T>(): T{}
10671070
// Message: Type annotations require valid Flow declaration.
10681071
```
@@ -1084,6 +1087,9 @@ import type A from "a"
10841087

10851088
/* @noflow */
10861089
import {type A} from "a"
1090+
1091+
/* @noflow */
1092+
export type {A} from "a"
10871093
```
10881094

10891095

@@ -3732,4 +3738,3 @@ function x<Y: A.B.C>(i: Y) { i }; type A = {}; x()
37323738
**Deprecated** Babylon (the Babel parser) v6.10.0 fixes parsing of the invalid syntax this plugin warned against.
37333739
37343740
Checks for simple Flow syntax errors.
3735-

0 commit comments

Comments
 (0)