-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgatsby.js
More file actions
127 lines (126 loc) · 3.01 KB
/
Copy pathgatsby.js
File metadata and controls
127 lines (126 loc) · 3.01 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
},
env: {
node: true,
es6: true,
},
plugins: [
"@typescript-eslint",
// TODO: add react
// 'react',
"prettier",
"import",
"autofix",
"css-import-order",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
// TODO: adding react we will need to add the next line
// 'plugin:react/recommended',
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:css-import-order/recommended",
],
rules: {
"import/no-named-as-default-member": "off", // This rule goes
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": [
"error",
{
types: {
"{}": false,
},
},
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-restricted-imports": "off",
"@typescript-eslint/no-restricted-imports": [
"error",
{
paths: [
"lodash",
"decentraland-ui",
"decentraland-dapps",
"decentraland-connect",
"decentraland-gatsby",
"semantic-ui-react",
"@dcl/schemas",
],
patterns: ["lodash.*"],
},
],
"autofix/no-debugger": "error",
"sort-imports": [
"error",
{
ignoreDeclarationSort: true, // don't want to sort import lines, use eslint-plugin-import instead
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
allowSeparatedGroups: true,
},
],
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
["sibling", "parent"], // <- Relative imports, the sibling and parent types they can be mingled together
"index",
"object",
"type",
"unknown",
],
pathGroupsExcludedImportTypes: ["react", "gatsby", "react-*"],
pathGroups: [
{
pattern: "react",
group: "builtin",
position: "before",
},
{
pattern: "react-*",
group: "builtin",
},
{
pattern: "gatsby",
group: "builtin",
},
{
pattern: "decentraland-*",
group: "internal",
},
{
pattern: "semantic-ui-react",
group: "internal",
},
],
"newlines-between": "always",
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
node: {},
"babel-module": {},
},
},
};