-
Notifications
You must be signed in to change notification settings - Fork 4
/
eslint.config.mjs
77 lines (76 loc) · 2.5 KB
/
eslint.config.mjs
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
/* eslint-disable @typescript-eslint/naming-convention */
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginUnicorn from "eslint-plugin-unicorn";
import tseslint from "typescript-eslint";
export default tseslint.config(
{ ignores: ["dist/"] },
eslint.configs.all,
eslintPluginUnicorn.configs["flat/all"],
...tseslint.configs.all,
eslintConfigPrettier,
{
languageOptions: {
ecmaVersion: 2023,
parserOptions: { project: true },
},
linterOptions: { reportUnusedDisableDirectives: "error" },
rules: {
"@typescript-eslint/ban-ts-comment": [
"error",
{ "ts-expect-error": false },
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ accessibility: "no-public" },
],
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/max-params": "off",
"@typescript-eslint/no-confusing-void-expression": [
"error",
{ ignoreArrowShorthand: true },
],
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/parameter-properties": [
"error",
{ prefer: "parameter-property" },
],
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/strict-boolean-expressions": [
"error",
{
allowNullableBoolean: true,
allowNullableNumber: true,
allowNullableString: true,
},
],
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
curly: "error",
eqeqeq: ["error", "always", { null: "ignore" }],
"func-style": ["error", "declaration"],
"id-length": "off",
"max-classes-per-file": "off",
"max-depth": "off",
"max-lines": "off",
"max-lines-per-function": "off",
"max-nested-callbacks": "off",
"max-statements": "off",
"no-empty": ["error", { allowEmptyCatch: true }],
"no-eq-null": "off",
"no-ex-assign": "off",
"no-new": "off",
"no-ternary": "off",
"no-void": "off",
"one-var": ["error", "never"],
radix: ["error", "as-needed"],
"sort-imports": "off",
"unicorn/catch-error-name": ["error", { name: "e" }],
"unicorn/explicit-length-check": "off",
"unicorn/no-keyword-prefix": "off",
"unicorn/no-null": "off",
"unicorn/prefer-json-parse-buffer": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off",
},
},
);