-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
116 lines (113 loc) · 2.91 KB
/
.eslintrc.cjs
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
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:@typescript-eslint/strict-type-checked",
],
overrides: [
{
env: {
node: true,
},
extends: ["plugin:@typescript-eslint/disable-type-checked"],
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: true,
tsconfigRootDir: __dirname,
},
plugins: [
"prettier",
"simple-import-sort",
"import",
"@typescript-eslint",
"@stylistic/js",
],
rules: {
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "after-used",
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrors: "none",
},
],
"@typescript-eslint/member-delimiter-style": ["error"],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"],
"@typescript-eslint/no-var-requires": "off",
"no-lone-blocks": "off",
camelcase: [
"error",
{
ignoreDestructuring: true,
},
],
curly: ["error", "all"],
"dot-notation": "error",
eqeqeq: ["error", "always"],
"guard-for-in": "error",
"@stylistic/js/linebreak-style": ["error", "unix"],
"no-array-constructor": "error",
"no-bitwise": "error",
"@stylistic/js/no-mixed-operators": "error",
"no-multi-assign": "error",
"no-console": ["warn"],
"no-nested-ternary": "error",
"no-new-func": "error",
"@stylistic/js/no-tabs": "warn",
"no-new-wrappers": "error",
"no-return-assign": ["error", "always"],
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-useless-constructor": "error",
"object-shorthand": ["error", "always"],
"prefer-arrow-callback": "warn",
"prefer-const": "warn",
"prefer-destructuring": [
"warn",
{
array: true,
object: true,
},
{
enforceForRenamedProperties: false,
},
],
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "warn",
"prefer-template": "warn",
"@stylistic/js/wrap-iife": ["error", "inside"],
"prettier/prettier": "error",
"sort-imports": "off",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
},
};