generated from well-known-components/base-ts-project
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathui.js
128 lines (128 loc) · 3.18 KB
/
ui.js
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
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
},
env: {
node: true,
es6: true,
},
plugins: ["@typescript-eslint", "react", "prettier", "import", "autofix"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:react/jsx-runtime",
],
rules: {
"react/display-name": "off",
"import/no-named-as-default-member": "off",
"import/no-default-export": "error",
"import/group-exports": "error",
"import/exports-last": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/ban-types": [
"error",
{
types: {
"{}": false,
},
},
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-restricted-imports": "off",
"@typescript-eslint/no-restricted-imports": [
"error",
{
paths: ["lodash", "decentraland-connect"],
patterns: ["lodash.*"],
},
],
"autofix/no-debugger": "error",
"sort-imports": [
"error",
{
ignoreDeclarationSort: true, // don't want to sort import lines, use eslint-plugin-import instead
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
allowSeparatedGroups: true,
},
],
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
["sibling", "parent"], // <- Relative imports, the sibling and parent types they can be mingled together
"index",
"object",
"type",
"unknown",
],
pathGroupsExcludedImportTypes: [
"react",
"react-*",
"@mui/*",
"@dcl/schemas/*",
"@emotion/*",
],
pathGroups: [
{
pattern: "react",
group: "builtin",
position: "before",
},
{
pattern: "react-*",
group: "builtin",
},
{
pattern: "decentraland-*",
group: "internal",
},
{
pattern: "@mui/*",
group: "internal",
},
{
pattern: "@emotion/*",
group: "internal",
},
{
pattern: "@dcl/schemas/*",
group: "internal",
},
{ pattern: "./*.types", group: "sibling", position: "after" },
{ pattern: "./*.styled", group: "sibling", position: "after" },
],
"newlines-between": "never",
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
node: {},
"babel-module": {},
},
react: {
version: "detect",
},
},
};