-
Notifications
You must be signed in to change notification settings - Fork 0
/
flow.js
34 lines (28 loc) · 963 Bytes
/
flow.js
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
// https://github.com/gajus/eslint-plugin-flowtype#readme
/**
* @type {import('eslint').Linter.Config}
*/
const config = {
extends: ['./index', 'plugin:flowtype/recommended'],
// NOTE: required to understand flow annotation syntax
parser: '@babel/eslint-parser',
plugins: ['flowtype'],
settings: {
flowtype: {
onlyFilesWithFlowAnnotation: true,
},
},
rules: {
'flowtype/boolean-style': 'error',
'flowtype/define-flow-type': 'warn', // NOTE: marks flow types as used
'flowtype/generic-spacing': 'off',
'flowtype/no-mutable-array': 'error',
'flowtype/no-primitive-constructor-types': 'error',
'flowtype/no-types-missing-file-annotation': 'error',
'flowtype/require-readonly-react-props': 'error',
'flowtype/require-valid-file-annotation': 'error',
'flowtype/space-after-type-colon': 'off',
'flowtype/use-flow-type': 'warn', // NOTE: marks flow types as used
},
}
module.exports = config