-
Notifications
You must be signed in to change notification settings - Fork 191
/
.eslintrc.js
60 lines (60 loc) · 1.47 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
module.exports = {
extends: [
"@react-native",
'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
rules: {
'prettier/prettier': [
'warn',
{
quoteProps: 'consistent',
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
},
],
"no-void": [
"error",
{ "allowAsStatement": true }
],
"@typescript-eslint/restrict-template-expressions": ["warn", {
allowNumber: true,
allowBoolean: true,
allowAny: true,
allowNullish: true
}],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/strict-boolean-expressions": "error"
},
overrides: [
// Detox tests
{
files: ['*.e2e.js'],
env: {
jest: true,
},
},
// Jest
{
files: ['**/__tests__/**', '**/__mocks__/**', '**/__helpers__/**'],
plugins: ['jest'],
env: {
jest: true,
},
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/ban-ts-comment": "warn"
},
},
],
parserOptions: {
project: ['./tsconfig.linter.json'],
},
};