@dcl/eslint-config 2.2.2-9962897455.commit-00cd6d2 → 2.3.1-18375806466.commit-9366a83

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.
Files changed (2) hide show
  1. package/core-services.js +117 -0
  2. package/package.json +9 -4
@@ -0,0 +1,117 @@
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: [
12
+ "@typescript-eslint",
13
+ "prettier",
14
+ "import",
15
+ "autofix",
16
+ ],
17
+ extends: [
18
+ "eslint:recommended",
19
+ "plugin:@typescript-eslint/recommended",
20
+ "plugin:prettier/recommended",
21
+ "plugin:import/recommended",
22
+ "plugin:import/typescript",
23
+ ],
24
+ rules: {
25
+ "eqeqeq": ["error", "always"],
26
+ "@typescript-eslint/no-inferrable-types": "error",
27
+ "@typescript-eslint/no-empty-function": "error",
28
+ "@typescript-eslint/no-explicit-any": "error",
29
+ "@typescript-eslint/no-floating-promises": "error",
30
+ "@typescript-eslint/no-non-null-assertion": "error",
31
+ "@typescript-eslint/no-namespace": "error",
32
+ "@typescript-eslint/prefer-optional-chain": "error",
33
+ "@typescript-eslint/consistent-type-imports": "error",
34
+ "@typescript-eslint/consistent-type-definitions": ["error", "interface"],
35
+ "@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
36
+ "@typescript-eslint/no-unused-vars": [
37
+ "warn",
38
+ {
39
+ "ignoreRestSiblings": true,
40
+ "argsIgnorePattern": "^_",
41
+ "varsIgnorePattern": "^_",
42
+ "caughtErrorsIgnorePattern": "^_"
43
+ }
44
+ ],
45
+ "import/no-named-as-default-member": "off",
46
+ "@typescript-eslint/ban-types": [
47
+ "error",
48
+ {
49
+ types: {
50
+ "{}": {
51
+ message: "Use Record<string, unknown> instead of {}",
52
+ fixWith: "Record<string, unknown>",
53
+ },
54
+ },
55
+ },
56
+ ],
57
+ "@typescript-eslint/explicit-module-boundary-types": "warn",
58
+ "no-restricted-imports": "off",
59
+ "@typescript-eslint/no-restricted-imports": "off",
60
+ "autofix/no-debugger": "error",
61
+ "sort-imports": [
62
+ "error",
63
+ {
64
+ ignoreDeclarationSort: true,
65
+ memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
66
+ allowSeparatedGroups: true,
67
+ },
68
+ ],
69
+ "import/order": [
70
+ "error",
71
+ {
72
+ groups: [
73
+ "builtin",
74
+ "external",
75
+ "internal",
76
+ ["sibling", "parent"],
77
+ "index",
78
+ "object",
79
+ "type",
80
+ "unknown",
81
+ ],
82
+ pathGroupsExcludedImportTypes: [],
83
+ pathGroups: [
84
+ {
85
+ pattern: "@well-known-components/*",
86
+ group: "internal",
87
+ position: "before",
88
+ },
89
+ {
90
+ pattern: "@dcl/*",
91
+ group: "internal",
92
+ },
93
+ {
94
+ pattern: "decentraland-*",
95
+ group: "internal",
96
+ },
97
+ ],
98
+ "newlines-between": "never",
99
+ alphabetize: {
100
+ order: "asc",
101
+ caseInsensitive: true,
102
+ },
103
+ },
104
+ ],
105
+ },
106
+ settings: {
107
+ "import/parsers": {
108
+ "@typescript-eslint/parser": [".ts", ".tsx"],
109
+ },
110
+ "import/resolver": {
111
+ typescript: {
112
+ alwaysTryTypes: true,
113
+ },
114
+ node: {},
115
+ },
116
+ },
117
+ };
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@dcl/eslint-config",
3
- "version": "2.2.2-9962897455.commit-00cd6d2",
3
+ "version": "2.3.1-18375806466.commit-9366a83",
4
4
  "description": "Decentraland ESLint config",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "build": "echo 'done building'",
8
8
  "lint:check": "echo 'done linting'",
9
- "test": "eslint -c test/.eslintrc.js test/"
9
+ "test": "jest",
10
+ "lint": "eslint -c test/.eslintrc.js test/"
10
11
  },
11
12
  "repository": {
12
13
  "type": "git",
@@ -40,6 +41,9 @@
40
41
  "prettier": "^3.3.2"
41
42
  },
42
43
  "devDependencies": {
44
+ "@types/jest": "^30.0.0",
45
+ "jest": "^30.1.3",
46
+ "ts-jest": "^29.1.0",
43
47
  "typescript": "^5.4.5"
44
48
  },
45
49
  "files": [
@@ -51,7 +55,8 @@
51
55
  "sdk.js",
52
56
  "gatsby.js",
53
57
  "dapps.js",
54
- "ui.js"
58
+ "ui.js",
59
+ "core-services.js"
55
60
  ],
56
- "commit": "00cd6d22d6c7997cb969aedd8905bec9e9e47d4b"
61
+ "commit": "9366a83933b932182955a990408336a12774fe6f"
57
62
  }