@dcl/eslint-config 1.0.5-20220608210046.commit-d51d9ec → 1.0.6

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/gatsby.js +127 -0
  2. package/package.json +13 -4
package/gatsby.js ADDED
@@ -0,0 +1,127 @@
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
+ // TODO: add react
14
+ // 'react',
15
+ "prettier",
16
+ "import",
17
+ "autofix",
18
+ "css-import-order",
19
+ ],
20
+ extends: [
21
+ "eslint:recommended",
22
+ "plugin:@typescript-eslint/recommended",
23
+ // TODO: adding react we will need to add the next line
24
+ // 'plugin:react/recommended',
25
+ "plugin:prettier/recommended",
26
+ "plugin:import/recommended",
27
+ "plugin:import/typescript",
28
+ "plugin:css-import-order/recommended",
29
+ ],
30
+ rules: {
31
+ "import/no-named-as-default-member": "off", // This rule goes
32
+ "@typescript-eslint/no-explicit-any": "off",
33
+ "@typescript-eslint/ban-types": [
34
+ "error",
35
+ {
36
+ types: {
37
+ "{}": false,
38
+ },
39
+ },
40
+ ],
41
+ "@typescript-eslint/no-empty-function": "off",
42
+ "@typescript-eslint/explicit-module-boundary-types": "off",
43
+ "@typescript-eslint/no-non-null-assertion": "off",
44
+ "no-restricted-imports": "off",
45
+ "@typescript-eslint/no-restricted-imports": [
46
+ "error",
47
+ {
48
+ paths: [
49
+ "lodash",
50
+ "decentraland-ui",
51
+ "decentraland-dapps",
52
+ "decentraland-connect",
53
+ "decentraland-gatsby",
54
+ "semantic-ui-react",
55
+ "@dcl/schemas",
56
+ ],
57
+ patterns: ["lodash.*"],
58
+ },
59
+ ],
60
+
61
+ "autofix/no-debugger": "error",
62
+ "sort-imports": [
63
+ "error",
64
+ {
65
+ ignoreDeclarationSort: true, // don't want to sort import lines, use eslint-plugin-import instead
66
+ memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
67
+ allowSeparatedGroups: true,
68
+ },
69
+ ],
70
+ "import/order": [
71
+ "error",
72
+ {
73
+ groups: [
74
+ "builtin",
75
+ "external",
76
+ "internal",
77
+ ["sibling", "parent"], // <- Relative imports, the sibling and parent types they can be mingled together
78
+ "index",
79
+ "object",
80
+ "type",
81
+ "unknown",
82
+ ],
83
+ pathGroupsExcludedImportTypes: ["react", "gatsby", "react-*"],
84
+ pathGroups: [
85
+ {
86
+ pattern: "react",
87
+ group: "builtin",
88
+ position: "before",
89
+ },
90
+ {
91
+ pattern: "react-*",
92
+ group: "builtin",
93
+ },
94
+ {
95
+ pattern: "gatsby",
96
+ group: "builtin",
97
+ },
98
+ {
99
+ pattern: "decentraland-*",
100
+ group: "internal",
101
+ },
102
+ {
103
+ pattern: "semantic-ui-react",
104
+ group: "internal",
105
+ },
106
+ ],
107
+ "newlines-between": "always",
108
+ alphabetize: {
109
+ order: "asc",
110
+ caseInsensitive: true,
111
+ },
112
+ },
113
+ ],
114
+ },
115
+ settings: {
116
+ "import/parsers": {
117
+ "@typescript-eslint/parser": [".ts", ".tsx"],
118
+ },
119
+ "import/resolver": {
120
+ typescript: {
121
+ alwaysTryTypes: true,
122
+ },
123
+ node: {},
124
+ "babel-module": {},
125
+ },
126
+ },
127
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/eslint-config",
3
- "version": "1.0.5-20220608210046.commit-d51d9ec",
3
+ "version": "1.0.6",
4
4
  "description": "Decentraland ESLint config",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -14,7 +14,9 @@
14
14
  "eslint",
15
15
  "config",
16
16
  "typescript",
17
- "ts"
17
+ "ts",
18
+ "sort",
19
+ "import"
18
20
  ],
19
21
  "author": "",
20
22
  "license": "Apache-2.0",
@@ -27,6 +29,12 @@
27
29
  "@typescript-eslint/parser": "^5.3.1",
28
30
  "eslint": "^8.2.0",
29
31
  "eslint-config-prettier": "^8.3.0",
32
+ "eslint-import-resolver-babel-module": "^5.3.1",
33
+ "eslint-import-resolver-jest": "^3.0.2",
34
+ "eslint-import-resolver-typescript": "^3.1.1",
35
+ "eslint-plugin-autofix": "^1.1.0",
36
+ "eslint-plugin-css-import-order": "^1.1.0",
37
+ "eslint-plugin-import": "^2.26.0",
30
38
  "eslint-plugin-prettier": "^4.0.0",
31
39
  "prettier": "^2.4.1"
32
40
  },
@@ -44,7 +52,8 @@
44
52
  ".eslintrc.js",
45
53
  "README.md",
46
54
  "LICENSE",
47
- "sdk.js"
55
+ "sdk.js",
56
+ "gatsby.js"
48
57
  ],
49
- "commit": "d51d9ecea964de0ababb75ea01c1a72d754b593b"
58
+ "commit": "44f87f02667a75ce01754e8d186a9fe7051f84b3"
50
59
  }