forked from LuanRT/YouTube.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
111 lines (110 loc) · 3.19 KB
/
eslint.config.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
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
"**/dist/",
"**/test/",
"**/cache/",
"**/bundle/",
"**/examples/",
"**/src/proto/generated/",
"**/*.{js,mjs,cjs}",
"**/*.d.ts",
"*.ts",
],
}, {
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.node,
...globals.browser,
}
},
rules: {
"max-len": ["error", {
code: 200,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
}], quotes: ["error", "single"],
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/consistent-type-exports": "error",
'no-sparse-arrays': 'off',
"no-template-curly-in-string": "error",
"no-unreachable-loop": "error",
"no-unused-private-class-members": "off",
"no-prototype-builtins": "off",
"no-async-promise-executor": "off",
"no-case-declarations": "off",
"no-return-assign": "off",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"arrow-spacing": "error",
"no-invalid-this": "error",
"no-lone-blocks": "off",
"no-new-func": "off",
"no-new-wrappers": "error",
"no-new": "error",
"no-void": "error",
"no-octal-escape": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-useless-return": "error",
"no-else-return": "error",
"no-lonely-if": "error",
"no-undef-init": "error",
"no-unneeded-ternary": "error",
"no-var": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", {
max: 1,
maxEOF: 0,
}],
"no-tabs": "error",
"brace-style": "error",
"new-parens": "error",
"space-infix-ops": "error",
"template-curly-spacing": "error",
"wrap-regex": "error",
"capitalized-comments": "error",
"prefer-template": "error",
"keyword-spacing": ["error", {
before: true,
}],
"object-curly-spacing": ["warn", "always"],
"array-bracket-spacing": ["error", "always"],
"arrow-parens": ["error", "always"],
"comma-dangle": ["error", "never"],
"comma-spacing": ["error", {
before: false,
after: true,
}],
"computed-property-spacing": ["error", "never"],
"func-call-spacing": ["error", "never"],
indent: ["error", 2, {
SwitchCase: 1,
}],
"key-spacing": ["error", {
beforeColon: false,
}],
semi: ["error", "always"],
"operator-assignment": ["error", "always"],
},
}
];