Skip to content

Commit 7874229

Browse files
Explicitly annotate (@flow/@noflow) every JS file (#1533)
It's the first step towards #1484 and also enables additional ESLint rules.
1 parent d7594f3 commit 7874229

File tree

94 files changed

+201
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+201
-2
lines changed

.eslintrc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ rules:
5050
#flowtype/no-flow-fix-me-comments: undecided
5151
#flowtype/no-mutable-array: undecided
5252
#flowtype/no-primitive-constructor-types: undecided
53-
#flowtype/no-types-missing-file-annotation: undecided
53+
flowtype/no-types-missing-file-annotation: error
5454
#flowtype/no-unused-expressions: undecided
5555
flowtype/no-weak-types: [error, {any: false}]
5656
flowtype/object-type-delimiter: off
5757
#flowtype/require-exact-type: undecided
5858
#flowtype/require-parameter-type: undecided
5959
#flowtype/require-return-type: undecided
6060
#flowtype/require-types-at-top: undecided
61-
#flowtype/require-valid-file-annotation: undecided
61+
flowtype/require-valid-file-annotation: [error, always, { annotationStyle: block }]
6262
#flowtype/require-variable-type: undecided
6363
flowtype/semi: off
6464
#flowtype/sort-keys: undecided

src/__fixtures__/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Copyright (c) 2018-present, Facebook, Inc.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow strict
8+
*/
9+
110
import { join } from 'path';
211
import { readFileSync } from 'fs';
312

src/error/__tests__/GraphQLError-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
68
*/
79

810
import { expect } from 'chai';

src/error/__tests__/locatedError-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
68
*/
79

810
import { expect } from 'chai';

src/error/__tests__/printError-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
68
*/
79

810
import { expect } from 'chai';

src/execution/__tests__/abstract-promise-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
68
*/
79

810
import { expect } from 'chai';

src/execution/__tests__/abstract-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
68
*/
79

810
import { expect } from 'chai';

src/execution/__tests__/directives-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow strict
68
*/
79

810
import { expect } from 'chai';

src/execution/__tests__/executor-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
68
*/
79

810
import { expect } from 'chai';

src/execution/__tests__/lists-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @noflow
68
*/
79

810
import { expect } from 'chai';

0 commit comments

Comments
 (0)