-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
88 lines (87 loc) · 2.93 KB
/
eslint.config.mjs
File metadata and controls
88 lines (87 loc) · 2.93 KB
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
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintPluginPrettier from "eslint-plugin-prettier/recommended";
export default tseslint.config({
files: ["**/*.ts"],
ignores: ["dist/*", "types/*"],
extends: [
eslint.configs.recommended,
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
eslintPluginPrettier,
],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
allowDefaultProject: true,
},
},
rules: {
"array-callback-return": "error",
"block-scoped-var": "error",
"curly": "error",
"default-case-last": "error",
"eqeqeq": ["error", "always", { null: "ignore" }],
"id-length": ["error", { min: 2 }],
"no-duplicate-imports": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-implicit-coercion": "error",
"no-labels": "error",
"no-lonely-if": "error",
"no-multi-str": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-nonoctal-decimal-escape": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow-restricted-names": "error",
"no-template-curly-in-string": "error",
"no-underscore-dangle": "error",
"no-unreachable-loop": "error",
"no-useless-computed-key": "error",
"no-useless-rename": "error",
"no-var": "error",
"object-shorthand": "error",
"operator-assignment": "error",
"prefer-const": "error",
"prefer-exponentiation-operator": "error",
"prefer-object-has-own": "error",
"prefer-object-spread": "error",
"prefer-regex-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"radix": "error",
"symbol-description": "error",
"yoda": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-unsafe-type-assertion": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/prefer-destructuring": "error",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": ["error", { considerDefaultExhaustiveForUnions: true }],
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allow: [{ name: ["Error", "URL", "URLSearchParams"], from: "lib" }],
allowAny: true,
allowBoolean: true,
allowNullish: true,
allowNumber: true,
allowRegExp: true,
},
],
},
});