/
index.js
130 lines (130 loc) · 4.06 KB
/
index.js
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
128
129
130
module.exports = {
env: {
browser: true,
node: true
},
extends: [
"eslint:recommended",
"plugin:import/recommended",
"plugin:prettier/recommended",
"plugin:unicorn/recommended",
"prettier"
],
overrides: [
{
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:typescript-sort-keys/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:prettier/recommended",
"plugin:unicorn/recommended",
"prettier"
],
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
project: "./tsconfig.json"
},
plugins: [
"@typescript-eslint",
"typescript-sort-keys",
"import",
"unicorn",
"unused-imports",
"prettier"
],
rules: {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-definitions": ["warn", "interface"],
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_" }
],
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/unified-signatures": "warn",
"import/export": "error",
"import/newline-after-import": "warn",
"import/no-absolute-path": "warn",
"import/no-duplicates": "warn",
"import/no-named-as-default": "warn",
"import/no-named-as-default-member": "warn",
"import/order": [
"warn",
{
alphabetize: {
caseInsensitive: true,
order: "asc"
},
"newlines-between": "never"
}
],
"prefer-rest-params": "off",
"sort-imports": ["error", { ignoreDeclarationSort: true }],
"unicorn/filename-case": "off",
"unicorn/import-style": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-empty-file": "off",
"unicorn/no-null": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off",
"unused-imports/no-unused-imports": "warn"
},
settings: {
"import/resolver": {
typescript: {
project: "./tsconfig.json"
}
}
}
}
],
parserOptions: {
ecmaVersion: "latest"
},
plugins: ["import", "unicorn", "unused-imports", "prettier"],
rules: {
"import/export": "error",
"import/newline-after-import": "warn",
"import/no-absolute-path": "warn",
"import/no-duplicates": "warn",
"import/no-named-as-default": "warn",
"import/no-named-as-default-member": "warn",
"import/order": [
"warn",
{
alphabetize: {
caseInsensitive: true,
order: "asc"
},
"newlines-between": "never"
}
],
"prefer-rest-params": "off",
"sort-imports": ["error", { ignoreDeclarationSort: true }],
"unicorn/filename-case": "off",
"unicorn/import-style": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-empty-file": "off",
"unicorn/no-null": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off",
"unused-imports/no-unused-imports": "warn"
}
}