-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc
135 lines (135 loc) · 3.72 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module"
},
"plugins": ["prettier", "react", "import", "react-hooks"],
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"env": {
"browser": true
},
"rules": {
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": { "{}": false }
}
],
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"class-methods-use-this": "off",
"comma-dangle": "off",
"indent-legacy": 0,
"import/no-unresolved": 0,
"import/named": 0,
"import/namespace": 0,
"import/default": 0,
"import/no-named-as-default-member": 0,
"import/order": [
"error",
{
"groups": ["builtin", "unknown", "external", "internal", "sibling"],
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
},
{ "pattern": "apps/**", "group": "internal" },
{ "pattern": "assets/**", "group": "internal" },
{ "pattern": "config", "group": "internal" },
{ "pattern": "core/**", "group": "internal" },
{ "pattern": "i8n/**", "group": "internal" },
{ "pattern": "modules/**", "group": "internal" },
{ "pattern": "shared/**", "group": "internal" },
{ "pattern": "theme/**", "group": "internal" },
{ "pattern": "utils/**", "group": "internal" }
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always-and-inside-groups",
"alphabetize": {
"order": "asc",
"caseInsensitive": false
}
}
],
"indent": 0,
"no-param-reassign": [2, { "props": false }],
"no-tabs": ["off", { "allowIndentationTabs": true }],
"no-use-before-define": "off",
"no-unused-vars": "error",
"prettier/prettier": [
"error",
{
"endOfLine": "auto",
"arrowParens": "avoid"
}
],
"quotes": ["error", "double", { "avoidEscape": true }],
"react/prop-types": "off",
"react/jsx-filename-extension": "off",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"sort-imports": [
"error",
{
"ignoreCase": false,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
}
],
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"no-undef-init": "error",
"import/no-unused-modules": [0, { "unusedExports": true }]
},
"overrides": [
{
"files": ["*.js", "*.mjs"],
"rules": {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-var-requires": "off"
}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": 1,
"@typescript-eslint/no-explicit-any": "error",
"no-unused-vars": "off",
"react/display-name": "off",
"import/no-named-as-default": 0,
"react-hooks/exhaustive-deps": "warn",
"react/react-in-jsx-scope": 0
}
}
],
"globals": {
"fetch": false
},
"settings": {
"react": {
"version": "18.2.0"
}
}
}