-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
94 lines (93 loc) · 2.69 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
{
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"next",
"prettier"
],
"rules": {
// eslint
"max-lines": ["warn", 300],
"no-case-declarations": "off",
"no-console": "error",
"no-debugger": "error",
"no-var": "error",
"no-unused-vars": "warn",
"block-scoped-var": "error",
"no-param-reassign": "error",
"space-before-function-paren": ["off", "never"],
"key-spacing": [
"warn",
{
"mode": "minimum",
"beforeColon": false,
"afterColon": true
}
],
"arrow-spacing": ["warn"],
"spaced-comment": ["warn", "always", { "markers": ["/"] }],
"space-in-parens": ["warn", "never"],
"object-curly-spacing": ["warn", "always"],
"no-trailing-spaces": "warn",
"object-shorthand": ["warn", "methods"],
"prefer-template": "warn",
"no-useless-concat": "warn",
"prefer-const": "error",
"yoda": ["warn", "never", { "exceptRange": true }],
"quotes": ["warn", "single", { "avoidEscape": true }],
"max-len": [
"warn",
150,
{
"ignoreComments": true,
"ignoreUrls": true,
"ignorePattern": "d=\"([\\s\\S]*?)\"|className=\"([\\s\\S]*?)\""
}
],
"no-constant-condition": [
"warn",
{
"checkLoops": false
}
],
"brace-style": ["warn"],
"eqeqeq": ["warn", "always"],
// react
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"react/jsx-no-bind": "off",
"react/jsx-boolean-value": "warn",
"react/jsx-closing-bracket-location": "warn",
"react/jsx-tag-spacing": "warn",
"jsx-quotes": ["warn", "prefer-double"],
"react/jsx-wrap-multilines": "warn",
"react/jsx-handler-names": [
"off",
{
"eventHandlerPropPrefix": ""
}
],
"react/jsx-key": "warn",
"react/jsx-no-comment-textnodes": "warn",
"react/jsx-pascal-case": ["warn", { "allowAllCaps": true }],
"react/no-did-mount-set-state": "warn",
"react/no-did-update-set-state": "warn",
"react/sort-comp": "warn",
"react/prefer-es6-class": "warn",
"react/style-prop-object": "warn",
"react/no-unescaped-entities": "warn",
// nextjs
"@next/next/no-img-element": "off",
// @typescript-eslint
"@typescript-eslint/array-type": ["warn"],
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-unused-vars": ["warn", { "vars": "all", "args": "none" }],
"@typescript-eslint/no-inferrable-types": ["off"],
"@typescript-eslint/no-empty-function": ["off"],
"semi": ["error", "always"],
"default-case": "error",
"no-multi-spaces": "error"
}
}