/
index.js
50 lines (49 loc) · 1.2 KB
/
index.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const OFF = 0;
const WARNING = 1;
const ERROR = 2;
module.exports = {
extends: [
require.resolve('./node.js'),
'plugin:react/recommended',
'plugin:promise/recommended',
'prettier/react',
],
env: {
'react-native/react-native': true,
},
plugins: [
'react',
'react-native',
'react-hooks',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
rules: {
'promise/prefer-await-to-then': WARNING,
'react/display-name': OFF,
'react/no-multi-comp': [WARNING, { "ignoreStateless": true }],
'react/no-unused-prop-types': OFF,
'react/prop-types': OFF,
'react-native/no-unused-styles': ERROR,
'no-unused-vars': [ERROR, { 'argsIgnorePattern': '^_', 'caughtErrorsIgnorePattern': '^_' }],
'react-native/split-platform-components': OFF,
'react-native/no-inline-styles': WARNING,
'react-native/no-color-literals': WARNING,
'react-native/no-raw-text': ERROR,
'react-hooks/rules-of-hooks': ERROR,
'react-hooks/exhaustive-deps': WARNING,
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.android.js', '.ios.js', '.native.js'],
},
},
react: {
version: 'detect',
},
},
};