@dcl/eslint-config 2.1.1 → 2.1.2-9652045036.commit-24d59c3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/ui.js +126 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/eslint-config",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2-9652045036.commit-24d59c3",
|
|
4
4
|
"description": "Decentraland ESLint config",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"LICENSE",
|
|
51
51
|
"sdk.js",
|
|
52
52
|
"gatsby.js",
|
|
53
|
-
"dapps.js"
|
|
53
|
+
"dapps.js",
|
|
54
|
+
"ui.js"
|
|
54
55
|
],
|
|
55
|
-
"commit": "
|
|
56
|
+
"commit": "24d59c3c813e3253824d38234214ed8c62ede107"
|
|
56
57
|
}
|
package/ui.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: "@typescript-eslint/parser",
|
|
3
|
+
parserOptions: {
|
|
4
|
+
ecmaVersion: 2018,
|
|
5
|
+
sourceType: "module",
|
|
6
|
+
},
|
|
7
|
+
env: {
|
|
8
|
+
node: true,
|
|
9
|
+
es6: true,
|
|
10
|
+
},
|
|
11
|
+
plugins: ["@typescript-eslint", "react", "prettier", "import", "autofix"],
|
|
12
|
+
extends: [
|
|
13
|
+
"eslint:recommended",
|
|
14
|
+
"plugin:@typescript-eslint/recommended",
|
|
15
|
+
"plugin:react/recommended",
|
|
16
|
+
"plugin:prettier/recommended",
|
|
17
|
+
"plugin:import/recommended",
|
|
18
|
+
"plugin:import/typescript",
|
|
19
|
+
"plugin:react/jsx-runtime",
|
|
20
|
+
],
|
|
21
|
+
rules: {
|
|
22
|
+
"react/display-name": "off",
|
|
23
|
+
"import/no-named-as-default-member": "off",
|
|
24
|
+
"import/no-default-export": "error",
|
|
25
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
26
|
+
"@typescript-eslint/ban-types": [
|
|
27
|
+
"error",
|
|
28
|
+
{
|
|
29
|
+
types: {
|
|
30
|
+
"{}": false,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
35
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
36
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
37
|
+
"no-restricted-imports": "off",
|
|
38
|
+
"@typescript-eslint/no-restricted-imports": [
|
|
39
|
+
"error",
|
|
40
|
+
{
|
|
41
|
+
paths: ["lodash", "decentraland-connect"],
|
|
42
|
+
patterns: ["lodash.*"],
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
"autofix/no-debugger": "error",
|
|
46
|
+
"sort-imports": [
|
|
47
|
+
"error",
|
|
48
|
+
{
|
|
49
|
+
ignoreDeclarationSort: true, // don't want to sort import lines, use eslint-plugin-import instead
|
|
50
|
+
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
|
|
51
|
+
allowSeparatedGroups: true,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
"import/order": [
|
|
55
|
+
"error",
|
|
56
|
+
{
|
|
57
|
+
groups: [
|
|
58
|
+
"builtin",
|
|
59
|
+
"external",
|
|
60
|
+
"internal",
|
|
61
|
+
["sibling", "parent"], // <- Relative imports, the sibling and parent types they can be mingled together
|
|
62
|
+
"index",
|
|
63
|
+
"object",
|
|
64
|
+
"type",
|
|
65
|
+
"unknown",
|
|
66
|
+
],
|
|
67
|
+
pathGroupsExcludedImportTypes: [
|
|
68
|
+
"react",
|
|
69
|
+
"react-*",
|
|
70
|
+
"@mui/*",
|
|
71
|
+
"@dcl/schemas/*",
|
|
72
|
+
"@emotion/*",
|
|
73
|
+
],
|
|
74
|
+
pathGroups: [
|
|
75
|
+
{
|
|
76
|
+
pattern: "react",
|
|
77
|
+
group: "builtin",
|
|
78
|
+
position: "before",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
pattern: "react-*",
|
|
82
|
+
group: "builtin",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
pattern: "decentraland-*",
|
|
86
|
+
group: "internal",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
pattern: "@mui/*",
|
|
90
|
+
group: "internal",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
pattern: "@emotion/*",
|
|
94
|
+
group: "internal",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
pattern: "@dcl/schemas/*",
|
|
98
|
+
group: "internal",
|
|
99
|
+
},
|
|
100
|
+
{ pattern: "./*.types", group: "sibling", position: "after" },
|
|
101
|
+
{ pattern: "./*.styled", group: "sibling", position: "after" },
|
|
102
|
+
],
|
|
103
|
+
"newlines-between": "never",
|
|
104
|
+
alphabetize: {
|
|
105
|
+
order: "asc",
|
|
106
|
+
caseInsensitive: true,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
settings: {
|
|
112
|
+
"import/parsers": {
|
|
113
|
+
"@typescript-eslint/parser": [".ts", ".tsx"],
|
|
114
|
+
},
|
|
115
|
+
"import/resolver": {
|
|
116
|
+
typescript: {
|
|
117
|
+
alwaysTryTypes: true,
|
|
118
|
+
},
|
|
119
|
+
node: {},
|
|
120
|
+
"babel-module": {},
|
|
121
|
+
},
|
|
122
|
+
react: {
|
|
123
|
+
version: "detect",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
};
|