-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
226 lines (222 loc) · 6.84 KB
/
.eslintrc
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
{
"env": { "browser": true, "node": true, "es2022": true },
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint",
"import",
"react-hooks",
"react-refresh"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true },
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json", "./tsconfig.node.json"]
},
"rules": {
"indent": ["error", "tab", { "SwitchCase": 1 }],
"max-len": ["error", { "code": 130 }],
"no-return-assign": ["off"],
"quotes": ["error", "single"],
"prefer-const": "error",
"one-var": ["error", "never"],
"no-trailing-spaces": "error",
"no-constant-condition": "error",
"no-debugger": "error",
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty-character-class": "error",
"no-extra-semi": "error",
"no-func-assign": "error",
"no-ex-assign": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-obj-calls": "error",
"no-regex-spaces": "error",
"no-sparse-arrays": "error",
"no-template-curly-in-string": "error",
"no-unexpected-multiline": "error",
"no-unsafe-negation": "error",
"use-isnan": "error",
"accessor-pairs": "error",
"dot-location": ["error", "property"],
"no-alert": "error",
"no-caller": "error",
"no-empty-pattern": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-multi-spaces": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-octal": "error",
"no-octal-escape": "error",
"no-proto": "error",
"no-script-url": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-undef": "error",
"no-unmodified-loop-condition": "error",
"no-unused-labels": "error",
"no-useless-call": "error",
"no-void": "error",
"no-with": "error",
"yoda": "error",
"no-delete-var": "error",
"no-label-var": "error",
"no-restricted-globals": "error",
"no-shadow-restricted-names": "error",
"no-undef-init": "error",
"no-new-require": "error",
"no-restricted-modules": "error",
"array-bracket-spacing": "error",
"block-spacing": "error",
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": [2, { "before": false, "after": true }],
"comma-style": ["error", "last"],
"computed-property-spacing": "error",
"consistent-this": "warn",
"eol-last": "error",
"func-call-spacing": "error",
"id-blacklist": "error",
"id-match": "error",
"key-spacing": "error",
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"lines-around-comment": [ "error", {
"beforeBlockComment": true, "afterBlockComment": false,
"beforeLineComment": true, "afterLineComment": false,
"allowBlockStart": true, "allowBlockEnd": false,
"allowObjectStart": true, "allowObjectEnd": false,
"allowArrayStart": true, "allowArrayEnd": false
}
],
"no-array-constructor": "error",
"max-nested-callbacks": "error",
"new-parens": "error",
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 0 }],
"no-new-object": "error",
"no-whitespace-before-property": "error",
"object-curly-newline": "off",
"object-curly-spacing": ["error", "always"],
"require-jsdoc": "off",
"semi": "error",
"semi-spacing": "error",
"space-before-blocks": "error",
"space-before-function-paren": "error",
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"wrap-regex": "error",
"arrow-parens": ["error", "always"],
"arrow-spacing": "error",
"constructor-super": "error",
"generator-star-spacing": "error",
"no-class-assign": "error",
"no-confusing-arrow": "error",
"no-const-assign": "error",
"no-new-symbol": "error",
"no-duplicate-imports": "error",
"no-this-before-super": "error",
"require-yield": "error",
"rest-spread-spacing": ["error", "never"],
"template-curly-spacing": "error",
"yield-star-spacing": "error",
"no-extra-boolean-cast": "error",
"one-var-declaration-per-line": "error",
"no-unreachable": "error",
"react-refresh/only-export-components": "warn",
"import/first": "error",
"import/named": "error",
"import/no-commonjs": "error",
"import/newline-after-import": "error",
"import/no-self-import": "error",
"import/no-unresolved": "error",
"import/no-namespace": "error",
"import/order": [ "error", {
"groups": ["builtin", "external", "internal", "parent", "sibling", "unknown", "index" , "object" ,"type"],
"pathGroups": [
{ "pattern": "react", "group": "builtin" },
{ "pattern": "react-native", "group": "builtin" },
{ "pattern": "@nozbe/**", "group": "builtin", "position": "after" }
],
"pathGroupsExcludedImportTypes": [],
"newlines-between": "always",
"alphabetize": { "order": "asc", "caseInsensitive": false },
"warnOnUnassignedImports": true
}
],
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "lodash",
"message": "Import [module] from lodash/[module] instead"
}
],
"patterns": [
{
"group": ["lodash/set"],
"message": "Import [module] from lodash/fp/[module] instead"
}
]
}
],
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-wrap-multilines": "error",
"react/jsx-indent": ["error", "tab"],
"react/jsx-indent-props": ["error", "tab"],
"react/no-danger": "error",
"react/no-danger-with-children": "error",
"react/no-did-update-set-state": "error",
"react/no-direct-mutation-state": "error",
"react/no-is-mounted": "error",
"react/no-render-return-value": "error",
"react/no-unknown-property": "error",
"react/require-render-return": "error",
"react/self-closing-comp": "error",
"react/jsx-boolean-value": ["error", "never"],
"react/jsx-closing-bracket-location": ["error", "tag-aligned"],
"react/jsx-curly-spacing": ["error", "never"],
"react/jsx-equals-spacing": ["error", "never"],
"react/jsx-key": "error",
"react/jsx-no-comment-textnodes": "error",
"react/jsx-no-target-blank": "error",
"react/jsx-pascal-case": "error",
"react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }],
"react/jsx-tag-spacing": ["error", {
"closingSlash": "never",
"beforeSelfClosing": "always",
"afterOpening": "never",
"beforeClosing": "never"
}
],
"jsx-quotes": ["error", "prefer-single"],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error"
},
"settings": {
"react": { "version": "detect" },
"import/resolver": {
"typescript": {}
}
}
}