-
Notifications
You must be signed in to change notification settings - Fork 17
/
eslintrc.flow
39 lines (37 loc) · 1.25 KB
/
eslintrc.flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Flow static typing lint rules
// https://github.com/gajus/eslint-plugin-flowtype
// https://flowtype.org/
{
"rules": {
"flowtype/boolean-style": [2, "boolean"],
"flowtype/define-flow-type": 1, // suppress no-undef on flow types
"flowtype/no-dupe-keys": 2,
// Use Flow's version of no-unused-expressions
"flowtype/no-unused-expressions": [2, {"allowShortCircuit": true, "allowTernary": true}],
"no-unused-expressions": 0, // Disable this rule as flowtype/no-unused-expression supersedes it
"flowtype/no-weak-types": 0, // allow 'any' for now
// flow may still require parameter types in certain situations
"flowtype/require-parameter-type": 0,
"flowtype/require-return-type": 0,
"flowtype/require-valid-file-annotation": [
2,
"always", {
"annotationStyle": "line"
}
],
"flowtype/sort": 0,
"flowtype/type-id-match": 0,
"flowtype/use-flow-type": 1, // suppress no-unused-vars on flow types
},
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
},
"extends": [
"prettier/flowtype"
],
"plugins": [
"flowtype"
]
}