forked from waifuvault/WaifuVault
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
54 lines (52 loc) · 1.79 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
// @ts-check
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: ["src/migrations/**/*", "**/*.mjs"],
},
{
plugins: {
"@typescript-eslint": tseslint.plugin,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: true,
},
},
extends: [eslint.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.ts"],
rules: {
// common
"no-return-await": "error",
"no-unreachable-loop": "error",
"no-promise-executor-return": "off",
"no-unsafe-optional-chaining": "error",
"no-useless-backreference": "error",
"require-atomic-updates": "off",
"require-await": "error",
"no-await-in-loop": "off",
"spaced-comment": "error",
"no-unused-vars": "off",
curly: "error",
semi: "error",
camelcase: "off",
// TypeScript
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
accessibility: "explicit",
},
],
},
},
);