|
@@ -1,4 +1,40 @@
|
1
|
1
|
module.exports = {
|
2
|
2
|
root: true,
|
3
|
|
- extends: '@react-native-community',
|
|
3
|
+ extends: [
|
|
4
|
+ 'airbnb',
|
|
5
|
+ 'plugin:flowtype/recommended',
|
|
6
|
+ 'prettier',
|
|
7
|
+ 'prettier/flowtype',
|
|
8
|
+ 'prettier/react',
|
|
9
|
+ ],
|
|
10
|
+ parser: 'babel-eslint',
|
|
11
|
+ plugins: ['flowtype'],
|
|
12
|
+ env: {
|
|
13
|
+ jest: true,
|
|
14
|
+ },
|
|
15
|
+ rules: {
|
|
16
|
+ 'flowtype/define-flow-type': 1,
|
|
17
|
+ 'flowtype/no-mixed': 2,
|
|
18
|
+ 'flowtype/no-primitive-constructor-types': 2,
|
|
19
|
+ 'flowtype/no-types-missing-file-annotation': 2,
|
|
20
|
+ 'flowtype/no-weak-types': 2,
|
|
21
|
+ 'flowtype/require-parameter-type': 2,
|
|
22
|
+ 'flowtype/require-readonly-react-props': 0,
|
|
23
|
+ 'flowtype/require-return-type': [
|
|
24
|
+ 2,
|
|
25
|
+ 'always',
|
|
26
|
+ {
|
|
27
|
+ annotateUndefined: 'never',
|
|
28
|
+ },
|
|
29
|
+ ],
|
|
30
|
+ 'flowtype/require-valid-file-annotation': 2,
|
|
31
|
+ 'flowtype/type-id-match': [2, '^([A-Z][a-z0-9]+)+Type$'],
|
|
32
|
+ 'flowtype/use-flow-type': 1,
|
|
33
|
+ 'flowtype/valid-syntax': 1,
|
|
34
|
+ },
|
|
35
|
+ settings: {
|
|
36
|
+ flowtype: {
|
|
37
|
+ onlyFilesWithFlowAnnotation: false,
|
|
38
|
+ },
|
|
39
|
+ },
|
4
|
40
|
};
|