-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
.eslintrc.json
160 lines (157 loc) · 5.26 KB
/
.eslintrc.json
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
"env": {
"react-native/react-native": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:promise/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:eslint-comments/recommended"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": [
"react",
"react-native",
"promise",
"import",
"eslint-comments"
],
"settings": {
"react": {
"version": "detect"
},
"jest": {
"version": "detect"
}
},
"rules": {
"react/prop-types": ["error"],
"jsx-quotes": ["error", "prefer-single"],
"react-native/no-unused-styles": ["error"],
"react-native/split-platform-components": ["error"],
"react-native/no-color-literals": ["error"],
"react-native/no-raw-text": ["error"],
"import/order": ["error", {
"alphabetize": { "order": "asc", "caseInsensitive": true },
"newlines-between": "always-and-inside-groups"
}],
"array-bracket-spacing": ["error", "always", { "objectsInArrays": false, "arraysInArrays": false }],
"array-callback-return": ["error"],
"arrow-spacing": ["error"],
"block-spacing": ["error"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"comma-dangle": ["error", "never"],
"comma-spacing": ["error"],
"curly": ["error", "multi-line"],
"default-case-last": ["error"],
"dot-location": ["error", "property"],
"eol-last": ["error"],
"indent": ["error", "tab", { "SwitchCase": 1 }],
"key-spacing": ["error"],
"keyword-spacing": ["error"],
"max-params": ["error", { "max": 7 }],
"max-statements-per-line": ["error"],
"no-duplicate-imports": ["error"],
"no-empty-function": ["error"],
"no-floating-decimal": ["error"],
"no-multi-spaces": ["error"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-nested-ternary": ["error"],
"no-redeclare": ["error"],
"no-return-await": ["error"],
"no-sequences": ["error"],
"no-shadow": ["error"],
"no-throw-literal": ["error"],
"no-trailing-spaces": ["error"],
"no-unreachable": ["error"],
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true }],
"no-unused-vars": ["error"],
"no-var": ["error"],
"no-void": ["error"],
"object-curly-spacing": ["error", "always"],
"one-var": ["error", "never"],
"padded-blocks": ["error", "never"],
"prefer-const": ["error", { "destructuring": "all" }],
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }],
"radix": ["error"],
"semi": ["error"],
"space-before-blocks": ["error"],
"space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
"space-in-parens": ["error"],
"space-infix-ops": ["error"],
"yoda": ["error"]
},
"ignorePatterns": [ "coverage" ],
"overrides": [
{
"files": [ "./**/*.js" ],
"globals": {
"AbortController": "readonly",
"URL": "readonly",
"URLSearchParams": "readonly"
}
},
{
"files": [ "jest.setup.js", "./**/*.test.js" ],
"plugins": [ "jest" ],
"env": {
"jest/globals": true
},
"globals": {
"fetch": "readonly"
},
"extends": [
"plugin:jest/recommended",
"plugin:jest/style"
],
"rules": {
"jest/consistent-test-it": ["error"],
"jest/lowercase-name": ["error", { "ignoreTopLevelDescribe": true }],
"jest/require-top-level-describe": ["error"]
}
},
{
"files": [ "./assets/**/*.staticjs" ],
"extends": [
"plugin:compat/recommended"
],
"globals": {
"postExpoEvent": "readonly"
},
"env": {
"react-native/react-native": false,
"browser": true,
"es6": true
}
},
{
"files": [
"./**/*.ts",
"./**/*.tsx"
],
"parser": "@typescript-eslint/parser",
"plugins": [ "@typescript-eslint" ],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:promise/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:eslint-comments/recommended"
]
}
]
}