-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
70 lines (63 loc) · 2.44 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
{
"plugins": ["effector", "prettier"],
"extends": [
"next",
"plugin:effector/recommended",
"plugin:effector/scope",
"plugin:@typescript-eslint/recommended",
"prettier" // Add "prettier" last. This will turn off eslint rules conflicting with prettier. This is not what will format our code.
],
"rules": {
"import/no-anonymous-default-export": [2, {"allowArrowFunction": true}],
"@typescript-eslint/naming-convention": [
"error",
{"selector": "interface", "format": ["PascalCase"], "custom": {"regex": "^I[A-Z]", "match": true}},
{"selector": "typeAlias", "format": ["PascalCase"], "custom": {"regex": "^T[A-Z]", "match": true}},
{"selector": "enum", "format": ["PascalCase"], "custom": {"regex": "^E[A-Z]", "match": true}},
{"selector": "variable", "format": ["camelCase", "UPPER_CASE", "PascalCase"]}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
"effector/prefer-sample-over-forward-with-mapping": "off",
"effector/no-getState": "off",
"react-hooks/rules-of-hooks": "error", // Check rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"@next/next/no-img-element": "off",
"no-sequences": "error",
"no-nested-ternary": "error",
"no-extra-boolean-cast": "error",
"no-empty-pattern": "error",
"no-console": ["warn"],
"no-restricted-imports": ["error",
{ "paths": [
{
"name": "@mui/system",
"importNames": ["styled"],
"message": "Please import 'styled' from 'utils/styles' instead."
},
{
"name": "@mui/material",
"importNames": ["styled"],
"message": "Please import 'styled' from 'utils/styles' instead."
}
]
}],
"react/prop-types": "off",
"react/display-name": "off",
"react/jsx-curly-brace-presence": ["error", { "props": "never", "children": "always" }],
"react/jsx-sort-props": [
"error",
{
"reservedFirst": ["key", "ref"]
}
],
"padding-line-between-statements": [
"error",
{"blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
{"blankLine": "always", "prev": "*", "next": "return"},
{"blankLine": "always", "prev": "import", "next": "export"},
{"blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"]}
],
"prettier/prettier": "error"
}
}