Skip to content

Commit 96c6714

Browse files
committed
Fix no-undef lint error in Flow definitions
1 parent f1dfe50 commit 96c6714

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.eslintrc

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"parser": "babel-eslint",
3+
"plugins": [
4+
"flowtype"
5+
],
36
"arrowFunctions": true,
47
"blockBindings": true,
58
"classes": true,
@@ -248,6 +251,22 @@
248251
],
249252
"wrap-regex": 0,
250253
"no-var": 0,
251-
"max-len": [2, 80, 4]
254+
"max-len": [2, 80, 4],
255+
"flowtype/define-flow-type": 2,
256+
"flowtype/space-after-type-colon": [
257+
1,
258+
"always"
259+
],
260+
"flowtype/space-before-type-colon": [
261+
2,
262+
"never"
263+
],
264+
"flowtype/use-flow-type": 2,
265+
"flowtype/valid-syntax": 2
266+
},
267+
"settings": {
268+
"flowtype": {
269+
"onlyFilesWithFlowAnnotation": true
270+
}
252271
}
253272
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"chai-as-promised": "5.3.0",
5858
"coveralls": "2.11.9",
5959
"eslint": "2.10.2",
60+
"eslint-plugin-flowtype": "^2.11.4",
6061
"flow-bin": "0.25.0",
6162
"graphql": "0.6.0",
6263
"isparta": "4.0.0",

0 commit comments

Comments
 (0)