@dcl/eslint-config 2.2.1 → 2.2.2-9962897455.commit-00cd6d2
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/dapps.js +141 -56
- package/package.json +2 -2
package/dapps.js
CHANGED
|
@@ -4,89 +4,174 @@ module.exports = {
|
|
|
4
4
|
browser: true,
|
|
5
5
|
es6: true,
|
|
6
6
|
},
|
|
7
|
-
parser:
|
|
8
|
-
|
|
7
|
+
parser: "@typescript-eslint/parser",
|
|
8
|
+
parserOptions: {
|
|
9
|
+
ecmaVersion: 2018,
|
|
10
|
+
sourceType: "module",
|
|
11
|
+
},
|
|
12
|
+
plugins: ["@typescript-eslint", "import", "autofix"],
|
|
9
13
|
extends: [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
"eslint:recommended",
|
|
15
|
+
"plugin:import/recommended",
|
|
16
|
+
"plugin:import/typescript",
|
|
17
|
+
"plugin:@typescript-eslint/recommended",
|
|
18
|
+
"plugin:prettier/recommended",
|
|
15
19
|
],
|
|
16
20
|
rules: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
"react/display-name": "off",
|
|
22
|
+
"import/no-named-as-default-member": "off",
|
|
23
|
+
"import/no-default-export": "error",
|
|
24
|
+
"import/group-exports": "error",
|
|
25
|
+
"import/exports-last": "error",
|
|
26
|
+
"@typescript-eslint/no-explicit-any": "error",
|
|
27
|
+
"@typescript-eslint/ban-types": "error",
|
|
28
|
+
"@typescript-eslint/ban-tslint-comment": "error",
|
|
29
|
+
"@typescript-eslint/quotes": ["error", "single", { avoidEscape: true }],
|
|
30
|
+
"@typescript-eslint/no-misused-promises": [
|
|
31
|
+
"error",
|
|
32
|
+
{ checksVoidReturn: false },
|
|
33
|
+
],
|
|
34
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
35
|
+
"@typescript-eslint/no-unused-vars": [
|
|
36
|
+
"error",
|
|
37
|
+
{ argsIgnorePattern: "^_", ignoreRestSiblings: true },
|
|
38
|
+
],
|
|
39
|
+
"@typescript-eslint/unbound-method": "error",
|
|
40
|
+
"@typescript-eslint/naming-convention": [
|
|
41
|
+
"error",
|
|
42
|
+
{ selector: "default", format: ["camelCase"] },
|
|
43
|
+
{ selector: "variableLike", format: ["camelCase"] },
|
|
44
|
+
{
|
|
45
|
+
selector: "variable",
|
|
46
|
+
format: ["camelCase", "UPPER_CASE"],
|
|
47
|
+
leadingUnderscore: "allow",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
selector: "variable",
|
|
51
|
+
types: ["function"],
|
|
52
|
+
format: ["PascalCase", "camelCase"],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
selector: "parameter",
|
|
56
|
+
format: ["camelCase"],
|
|
57
|
+
leadingUnderscore: "allow",
|
|
58
|
+
},
|
|
59
|
+
{ selector: "memberLike", format: ["camelCase"] },
|
|
36
60
|
{
|
|
37
|
-
selector:
|
|
38
|
-
|
|
39
|
-
format: [
|
|
61
|
+
selector: "memberLike",
|
|
62
|
+
modifiers: ["private"],
|
|
63
|
+
format: ["camelCase"],
|
|
64
|
+
leadingUnderscore: "allow",
|
|
65
|
+
},
|
|
66
|
+
{ selector: "typeLike", format: ["PascalCase"] },
|
|
67
|
+
{ selector: "typeParameter", format: ["PascalCase"], prefix: ["T"] },
|
|
68
|
+
{
|
|
69
|
+
selector: "interface",
|
|
70
|
+
format: ["PascalCase"],
|
|
71
|
+
custom: { regex: "^I[A-Z]", match: false },
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
selector: [
|
|
75
|
+
"variable",
|
|
76
|
+
"function",
|
|
77
|
+
"objectLiteralProperty",
|
|
78
|
+
"objectLiteralMethod",
|
|
79
|
+
],
|
|
80
|
+
types: ["function"],
|
|
81
|
+
format: ["StrictPascalCase", "strictCamelCase"],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
selector: ["enum"],
|
|
85
|
+
format: ["UPPER_CASE", "PascalCase"],
|
|
86
|
+
leadingUnderscore: "allow",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
selector: ["enumMember"],
|
|
90
|
+
format: ["UPPER_CASE"],
|
|
91
|
+
leadingUnderscore: "allow",
|
|
40
92
|
},
|
|
41
|
-
{ selector: ['enum'], format: ['UPPER_CASE', 'PascalCase'], leadingUnderscore: 'allow' },
|
|
42
|
-
{ selector: ['enumMember'], format: ['UPPER_CASE'], leadingUnderscore: 'allow' },
|
|
43
93
|
],
|
|
44
|
-
|
|
45
|
-
|
|
94
|
+
"autofix/no-debugger": "error",
|
|
95
|
+
"sort-imports": [
|
|
96
|
+
"error",
|
|
46
97
|
{
|
|
47
|
-
|
|
48
|
-
|
|
98
|
+
ignoreDeclarationSort: true, // don't want to sort import lines, use eslint-plugin-import instead
|
|
99
|
+
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
|
|
100
|
+
allowSeparatedGroups: true,
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
"import/order": [
|
|
104
|
+
"error",
|
|
105
|
+
{
|
|
106
|
+
groups: [
|
|
107
|
+
"builtin",
|
|
108
|
+
"external",
|
|
109
|
+
"internal",
|
|
110
|
+
"parent",
|
|
111
|
+
"sibling",
|
|
112
|
+
"index",
|
|
113
|
+
"object",
|
|
114
|
+
],
|
|
115
|
+
pathGroupsExcludedImportTypes: [
|
|
116
|
+
"react",
|
|
117
|
+
"react-*/**",
|
|
118
|
+
"react-*",
|
|
119
|
+
"@dcl/**",
|
|
120
|
+
"decentraland-*/**",
|
|
121
|
+
"decentraland-*",
|
|
122
|
+
"@mui/*",
|
|
123
|
+
"@dcl/schemas/*",
|
|
124
|
+
"@emotion/*",
|
|
125
|
+
],
|
|
49
126
|
pathGroups: [
|
|
50
|
-
{ pattern:
|
|
51
|
-
{ pattern:
|
|
52
|
-
{ pattern:
|
|
53
|
-
{ pattern:
|
|
54
|
-
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{ pattern:
|
|
60
|
-
{ pattern:
|
|
127
|
+
{ pattern: "react", group: "builtin", position: "before" },
|
|
128
|
+
{ pattern: "react-*/**", group: "builtin" },
|
|
129
|
+
{ pattern: "react-*", group: "builtin" },
|
|
130
|
+
{ pattern: "@dcl/**", group: "external", position: "after" },
|
|
131
|
+
{
|
|
132
|
+
pattern: "decentraland-*/**",
|
|
133
|
+
group: "external",
|
|
134
|
+
position: "after",
|
|
135
|
+
},
|
|
136
|
+
{ pattern: "decentraland-*", group: "external", position: "after" },
|
|
137
|
+
{ pattern: "@mui/*", group: "internal" },
|
|
138
|
+
{ pattern: "@emotion/*", group: "internal" },
|
|
139
|
+
{ pattern: "@dcl/schemas/*", group: "internal" },
|
|
140
|
+
{ pattern: "lib/**", group: "internal", position: "before" },
|
|
141
|
+
{ pattern: "modules/**", group: "internal", position: "before" },
|
|
142
|
+
{ pattern: "components/**", group: "internal", position: "after" },
|
|
143
|
+
{ pattern: "./*.types", group: "sibling", position: "after" },
|
|
144
|
+
{ pattern: "./*.styled", group: "sibling", position: "after" },
|
|
145
|
+
{ pattern: "./*.css", group: "sibling", position: "after" },
|
|
61
146
|
],
|
|
62
147
|
distinctGroup: false,
|
|
63
|
-
|
|
148
|
+
"newlines-between": "never",
|
|
64
149
|
alphabetize: {
|
|
65
|
-
order:
|
|
150
|
+
order: "asc",
|
|
66
151
|
caseInsensitive: true,
|
|
67
|
-
orderImportKind:
|
|
152
|
+
orderImportKind: "desc",
|
|
68
153
|
},
|
|
69
154
|
warnOnUnassignedImports: true,
|
|
70
155
|
},
|
|
71
156
|
],
|
|
72
|
-
|
|
73
|
-
|
|
157
|
+
"prettier/prettier": [
|
|
158
|
+
"error",
|
|
74
159
|
{
|
|
75
160
|
semi: false,
|
|
76
161
|
singleQuote: true,
|
|
77
162
|
printWidth: 140,
|
|
78
163
|
tabWidth: 2,
|
|
79
|
-
trailingComma:
|
|
80
|
-
arrowParens:
|
|
164
|
+
trailingComma: "none",
|
|
165
|
+
arrowParens: "avoid",
|
|
81
166
|
},
|
|
82
167
|
],
|
|
83
168
|
},
|
|
84
169
|
settings: {
|
|
85
|
-
|
|
170
|
+
"import/resolver": {
|
|
86
171
|
typescript: true,
|
|
87
172
|
node: {
|
|
88
|
-
paths: [
|
|
173
|
+
paths: ["./src"],
|
|
89
174
|
},
|
|
90
175
|
},
|
|
91
176
|
},
|
|
92
|
-
}
|
|
177
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/eslint-config",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2-9962897455.commit-00cd6d2",
|
|
4
4
|
"description": "Decentraland ESLint config",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"dapps.js",
|
|
54
54
|
"ui.js"
|
|
55
55
|
],
|
|
56
|
-
"commit": "
|
|
56
|
+
"commit": "00cd6d22d6c7997cb969aedd8905bec9e9e47d4b"
|
|
57
57
|
}
|