forked from hmarr/openai-chat-tokens
-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
69 lines (66 loc) · 1.98 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
import eslint from "@eslint/js"
import prettier from "eslint-config-prettier"
import tseslint from "typescript-eslint"
export default tseslint.config(
{
languageOptions: {
parserOptions: { project: "./tsconfig.eslint.json" },
},
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
prettier,
{
rules: {
"@typescript-eslint/class-methods-use-this": [
"error",
{
ignoreClassesThatImplementAnInterface: true,
ignoreOverrideMethods: true,
},
],
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{ fixStyle: "separate-type-imports" },
],
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ accessibility: "no-public" },
],
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/prefer-nullish-coalescing": [
"error",
{ ignorePrimitives: true },
],
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/promise-function-async": [
"error",
{ checkArrowFunctions: false },
],
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/return-await": "error",
"@typescript-eslint/sort-type-constituents": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"func-style": ["error", "declaration"],
},
},
{
ignores: [
".pnpm-store/",
"dist/",
"docs/",
"node_modules/",
"package-lock.json",
"pnpm-lock.yaml",
],
},
)