-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
160 lines (160 loc) · 3.74 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
{
"settings": {
"import/resolver": {
"typescript": {}
}
},
"extends": [
"react-app",
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:sonarjs/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"plugins": [
"@typescript-eslint",
"react-hooks",
"import",
"prettier",
"sonarjs",
"sort-keys-fix",
"prefer-arrow"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"globals": {
"React": "readonly"
},
"rules": {
"no-unused-vars": [
0,
{
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"import/no-named-as-default": 0,
"prettier/prettier": "error",
"import/order": [
"error",
{
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": [
"react"
],
"groups": [
[
"external",
"builtin"
],
"internal",
[
"parent",
"sibling",
"index"
]
],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
],
"newline-before-return": [
"error"
],
"import/no-default-export": "error",
"import/default": "off",
"no-restricted-exports": [
"error",
{
"restrictedNamedExports": [
"default"
]
}
],
"react-hooks/exhaustive-deps": "error",
"curly": "error",
"no-console": "off",
// "no-console": [
// "warn",
// {
// "allow": [
// "info",
// "warn",
// "error"
// ]
// }
// ],
"no-shadow": "off",
"require-await": "error",
"arrow-body-style": [
"error",
"as-needed"
],
"@typescript-eslint/no-shadow": [
"error"
],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/ban-ts-comment": "off",
"no-restricted-imports": "error",
"prefer-arrow-callback": "error",
"@typescript-eslint/no-var-requires": "off",
"no-constant-condition": "off",
"import/namespace": "off",
"react/jsx-sort-props": [
"error",
{
"callbacksLast": true,
"shorthandFirst": true,
"shorthandLast": false,
"noSortAlphabetically": false,
"reservedFirst": true
}
],
"sort-keys": [
"error",
"asc",
{
"caseSensitive": true,
"natural": false,
"minKeys": 2,
"allowLineSeparatedGroups": true
}
],
"sort-keys-fix/sort-keys-fix": "warn",
"prefer-arrow/prefer-arrow-functions": [
"warn",
{
"disallowPrototype": true,
"singleReturnOnly": false,
"classPropertiesAllowed": false
}
]
}
}