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