-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
71 lines (69 loc) · 1.92 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
{
"env": {
"browser": true,
"es2021": true,
"jest/globals": true
},
"extends": [
"next/core-web-vitals",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:jest/recommended",
"plugin:tailwindcss/recommended",
"plugin:@tanstack/eslint-plugin-query/recommended",
"plugin:prettier/recommended"
],
// Avoid run eslint on shadcn folder
"ignorePatterns": ["**/components/ui/**"],
"plugins": ["jest"],
"rules": {
// C
"camelcase": "warn",
"capitalized-comments": "off",
// D
"default-param-last": ["error"],
// E
"eqeqeq": "error",
// M
"max-params": ["warn", 3],
// N
"no-console": ["warn", { "allow": ["warn", "error"] }],
"no-empty-function": "warn",
"no-param-reassign": "error",
// P
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": "*", "next": "function" },
{ "blankLine": "always", "prev": "*", "next": "block-like" },
{ "blankLine": "always", "prev": ["import"], "next": "*" },
{
"blankLine": "any",
"prev": ["import"],
"next": ["import"]
},
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
{
"blankLine": "any",
"prev": ["const", "let", "var"],
"next": ["const", "let", "var"]
}
],
"prefer-const": "error",
"prefer-destructuring": "error",
"prefer-object-spread": "warn",
// S
"sort-keys": ["off", "asc", { "natural": true, "minKeys": 5 }],
"sort-vars": "error",
"react/boolean-prop-naming": ["warn"],
"react/jsx-newline": ["warn"],
"react/jsx-no-useless-fragment": ["error", { "allowExpressions": true }],
"react/jsx-sort-props": ["warn", { "ignoreCase": true }]
},
"settings": {
"import/resolver": {
"typescript": true,
"node": true
}
}
}