-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
76 lines (76 loc) · 1.86 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
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
project: `./tsconfig.json`,
createDefaultProgram: true,
},
plugins: ["promise"],
extends: [
"@react-native-community",
"airbnb",
"airbnb-typescript",
"prettier",
],
rules: {
"react/jsx-boolean-value": "off",
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"import/prefer-default-export": "off",
"arrow-body-style": ["error", "always"],
"sort-imports": [
"error",
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: true,
},
],
"prettier/prettier": [
"error",
{
semi: true,
},
],
"promise/always-return": "error",
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/catch-or-return": "error",
"promise/no-native": "off",
"promise/no-nesting": "error",
"promise/no-promise-in-callback": "error",
"promise/no-callback-in-promise": "error",
"promise/avoid-new": "error",
"promise/no-new-statics": "error",
"promise/no-return-in-finally": "error",
"promise/valid-params": "error",
"react-native/no-inline-styles": "error",
"react-native/no-unused-styles": "error",
"react/function-component-definition": [
2,
{
namedComponents: [
"function-declaration",
"function-expression",
"arrow-function",
],
unnamedComponents: ["function-expression", "arrow-function"],
},
],
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: ["**/__e2e__/**", "**/__test__/**", "test-*.{ts,tsx}"],
optionalDependencies: false,
},
],
},
overrides: [
{
files: ["**/*.tsx", "**/*.ts"],
rules: {
"react/prop-types": "off",
},
},
],
};