-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
78 lines (73 loc) · 1.94 KB
/
.eslintrc.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
module.exports = {
extends: ['airbnb', 'prettier'],
plugins: [
'react',
'react-native',
'react-hooks',
"@typescript-eslint",
'prettier'
],
parser: "@typescript-eslint/parser",
env: {
jest: true,
'react-native/react-native': true,
},
settings: {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
rules: {
'prettier/prettier': 'error',
'no-use-before-define': 'off',
'react/jsx-filename-extension': 'off',
'import/prefer-default-export': 'off',
'react/prop-types': 'off',
'comma-dangle': 'off',
'padded-blocks': 'off',
'arrow-body-style': 'off',
'object-curly-newline': 'off',
"import/extensions": "off",
"no-restricted-imports": [
'error',
{
"paths": [
{
"name": "react-native",
"importNames": ["Button", "Text", "TextInput"],
"message": "Please import the appropriate component from 'react-native-paper' instead."
},
]
}
],
'class-methods-use-this': "off",
// TS Specific usage
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
'react/jsx-curly-newline': 'off',
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": 0,
'react/require-default-props': 0,
'react-hooks/exhaustive-deps': 'error',
'react-native/no-unused-styles': 2,
'react-native/split-platform-components': 2,
'react-native/no-inline-styles': 2,
'react-native/no-color-literals': 2,
'react-native/no-raw-text': "off",
'react-native/no-single-element-style-arrays': 2,
"react-native/no-color-literals": "off", // consider
'react-hooks/exhaustive-deps': [
'error',
{
additionalHooks: '(useAsync|useAsyncAction)',
},
],
},
globals: {
fetch: false
}
};