-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
102 lines (102 loc) · 3.62 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
{
"extends": [
"next/core-web-vitals",
"eslint-config-next",
"plugin:jsx-a11y/recommended"
],
"plugins": [
"destructuring-newline",
"import-newlines",
"jsx-a11y"
],
"rules": {
"indent": [2, "tab", { "SwitchCase": 1, "VariableDeclarator": 1 }],
"key-spacing": ["error", {
"mode": "strict"
}],
// Prefer useCallback
"linebreak-style": 0,
"react/no-unescaped-entities": ["error", {"forbid": [">", "}"]}],
"destructuring-newline/object-property-newline": 2,
"object-curly-newline": ["error", {
"ObjectExpression": "always",
"ObjectPattern": { "multiline": true },
"ExportDeclaration": { "multiline": true, "minProperties": 1 }
}],
"array-element-newline": ["error", {
"ArrayExpression": "consistent",
"ArrayPattern": { "minItems": 3 }
}],
"array-bracket-newline": ["error", "consistent"],
"react/jsx-indent": ["error", "tab", {
"checkAttributes": true,
"indentLogicalExpressions": true
}],
// Disallow use of lambda functions in JSX props
"function-paren-newline": ["error", "multiline-arguments"],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"react/jsx-wrap-multilines": ["error",
{
"declaration": "parens-new-line",
"assignment": "parens-new-line",
"return": "parens-new-line",
"arrow": "parens-new-line",
"condition": "parens-new-line",
"logical": "parens-new-line",
"prop": "parens-new-line"
}
],
"react/jsx-curly-spacing": ["error", "never"],
"react/jsx-closing-bracket-location": ["error", {
"selfClosing": "tag-aligned",
"nonEmpty": "tag-aligned"
}],
"react/jsx-closing-tag-location": "error",
"react/jsx-first-prop-new-line": ["error", "always"],
"react/jsx-indent-props": ["error", "tab"],
"react/jsx-max-props-per-line": ["error", { "maximum": 1, "when": "always" }],
"semi": ["error", "never"],
"comma-dangle": ["error", "never"],
"no-multiple-empty-lines": ["error", {
"max": 1
}],
"no-console": ["error", { "allow": ["error", "warn"]}],
"no-mixed-operators": ["error"],
"no-negated-condition": "error",
"no-nested-ternary": "error",
"yoda": "error",
"jsx-quotes": ["error", "prefer-single"],
"no-trailing-spaces": "error",
"object-curly-spacing": ["error", "always"],
"object-property-newline": "error",
"padded-blocks": ["error", "never"],
"padding-line-between-statements": [
"error",
{ "blankLine": "never", "prev": ["const", "let", "var"], "next": "*"},
{ "blankLine": "always", "prev": "*", "next": "export"},
{ "blankLine": "always", "prev": "multiline-expression", "next": "const"},
{ "blankLine": "always", "prev": "const", "next": "multiline-expression"},
{ "blankLine": "always", "prev": "multiline-const", "next": ["multiline-expression", "return"]},
{ "blankLine": "always", "prev": ["multiline-expression", "return"], "next": "multiline-const"}
],
"quotes": ["error", "single"],
"template-curly-spacing": "error",
"prefer-arrow-callback": ["error"],
"no-lonely-if": "error",
"no-implicit-coercion": "error",
"no-extra-boolean-cast": "error",
"no-confusing-arrow": "error",
"import-newlines/enforce": ["error", {
"items": 1
}],
"no-restricted-imports": ["error", {
"paths": [{
"name": "@firebase/functions",
"importNames": ["httpsCallable"]
}]
}],
"jsx-a11y/anchor-is-valid": "off",
"react/jsx-curly-brace-presence": ["error", { "props": "always", "children": "always" }]
}
}