generated from well-known-components/base-ts-project
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcore-services.js
More file actions
112 lines (110 loc) · 2.93 KB
/
core-services.js
File metadata and controls
112 lines (110 loc) · 2.93 KB
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
const { getTypeScriptProjectParserOptions } = require("./utils/tsconfig")
const tsProject = getTypeScriptProjectParserOptions()
const hasTypeScriptProject = Boolean(tsProject)
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
...(tsProject ?? {}),
},
env: {
node: true,
es6: true,
},
plugins: [
"@typescript-eslint",
"prettier",
"import",
"autofix",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
],
rules: {
"eqeqeq": ["error", "always"],
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-floating-promises": hasTypeScriptProject ? "error" : "off",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"import/no-named-as-default-member": "off",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"no-restricted-imports": "off",
"@typescript-eslint/no-restricted-imports": "off",
"autofix/no-debugger": "error",
"sort-imports": [
"error",
{
ignoreDeclarationSort: true,
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
allowSeparatedGroups: true,
},
],
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
["sibling", "parent"],
"index",
"object",
"type",
"unknown",
],
pathGroupsExcludedImportTypes: [],
pathGroups: [
{
pattern: "@well-known-components/*",
group: "internal",
position: "before",
},
{
pattern: "@dcl/*",
group: "internal",
},
{
pattern: "decentraland-*",
group: "internal",
},
],
"newlines-between": "never",
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
node: {},
},
},
};