-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
103 lines (103 loc) · 2.82 KB
/
Copy path.eslintrc.js
File metadata and controls
103 lines (103 loc) · 2.82 KB
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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:import/errors",
"plugin:import/warnings",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: "module",
},
plugins: ["react", "jsx-a11y", "react-hooks", "prettier", "@typescript-eslint", "import"],
rules: {
"no-console": ["error", { allow: ["info", "groupCollapsed", "groupEnd", "error"] }],
"prettier/prettier": ["error", { endOfLine: "auto", singleQuote: false }],
"react/react-in-jsx-scope": 0,
"no-use-before-define": ["error", "nofunc"],
"@typescript-eslint/no-use-before-define": ["error", "nofunc"],
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-explicit-any": 0,
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"import/order": [
"error",
{
pathGroups: [
{
pattern: "@root/**",
group: "parent",
},
{
pattern: "@api/**",
group: "parent",
},
{
pattern: "@assets/**",
group: "parent",
},
{
pattern: "@utils/**",
group: "parent",
},
{
pattern: "@sections/**",
group: "parent",
},
{
pattern: "@components/**",
group: "parent",
},
{
pattern: "@interfaces/**",
group: "parent",
position: "after",
},
{
pattern: "./*.interface",
group: "type",
position: "after",
},
{
pattern: "./**",
patternOptions: { matchBase: true },
group: "index",
},
],
pathGroupsExcludedImportTypes: ["builtin", "parent"],
groups: ["builtin", "external", "internal", "parent", "sibling", "object", "type", "index"],
"newlines-between": "always",
alphabetize: { order: "asc" },
},
],
"import/named": "error",
"import/default": "error",
"import/namespace": "error",
"import/newline-after-import": ["error", { count: 1 }],
"import/no-unresolved": "off",
"import/extensions": "off",
"import/no-cycle": "warn",
"import/export": "error",
"import/prefer-default-export": "off",
"import/no-duplicates": "error",
},
settings: {
react: {
version: "detect",
},
},
};