-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
111 lines (109 loc) · 2.75 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:import/errors",
"plugin:import/typescript",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"settings": {
"import/resolver": {
"alias": {
"map": [
["src", "./src"],
["#", "./tests"]
],
"extensions": [".ts", ".tsx", ".json"]
}
},
"import/ignore": ["react-native"]
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
// Bug avoiding
"import/no-cycle": "error",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/no-explicit-any": "error",
"no-template-curly-in-string": ["error"],
"nonblock-statement-body-position": [
"error"
],
// Code style
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": "block-like"
},
{
"blankLine": "always",
"prev": "block-like",
"next": "*"
}
],
"no-else-return": ["error"],
"no-var": ["error"],
"no-multi-spaces": ["error"],
"no-sequences": ["error"],
"no-useless-call": ["error"],
"no-useless-concat": ["error"],
"no-useless-return": ["error"],
"no-void": ["error"],
"no-multi-assign": ["error"],
"no-multiple-empty-lines": ["error", {"max": 1}],
"no-negated-condition": ["error"],
"array-bracket-newline": ["error", "consistent"],
"eol-last": ["error", "always"],
"keyword-spacing": ["error"],
"max-classes-per-file": "error",
"no-nested-ternary": ["error"],
"no-tabs": ["error"],
"no-trailing-spaces": ["error"],
"no-unneeded-ternary": ["error"],
"no-whitespace-before-property": ["error"],
"object-curly-newline": [
"error",
{
"consistent": true
}
],
"no-confusing-arrow": ["error"],
"padded-blocks": ["error", "never"],
"no-useless-computed-key": ["error"],
"template-curly-spacing": ["error"],
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"private-field",
"protected-field",
"public-field",
"constructor",
"private-method",
"protected-method",
"public-method"
]
}
],
"dot-location": ["error", "property"],
// Import
"import/no-duplicates": ["error"],
"import/no-namespace": ["error"],
"import/order": [
"error",
{
"newlines-between": "always",
"groups": ["builtin", "external", "internal", "unknown"],
"pathGroups": [
{"pattern": "src/**", "group": "internal"},
{"pattern": "./**", "group": "unknown"}
]
}
]
}
}