generated from userscripters/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
55 lines (52 loc) · 1.74 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
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import stylistic from "@stylistic/eslint-plugin";
import globals from "globals";
export default tseslint.config({
extends: [
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
...tseslint.configs.recommendedTypeChecked,
stylistic.configs.customize({
quotes: "double",
indent: 4,
semi: true,
}),
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.browser,
StackExchange: "readonly"
},
},
},
],
rules: {
"eqeqeq": "error",
"no-await-in-loop": "off",
"no-implicit-coercion": "off",
"no-loop-func": "error",
"no-useless-return": "off",
"no-var": "error",
"no-undefined": "error",
"no-unneeded-ternary": "error",
"no-param-reassign": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"require-await": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{ "checksVoidReturn": false }
],
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/restrict-template-expressions": ['error', { allowNumber: true }],
"@stylistic/arrow-parens": "error",
"@stylistic/brace-style": ["error", "1tbs", { "allowSingleLine": true }],
}
});