-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
77 lines (76 loc) · 2.56 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
70
71
72
73
74
75
76
77
import js from "@eslint/js";
import ts from "typescript-eslint";
import importPlugin from "eslint-plugin-import";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
export default ts.config(
js.configs.recommended,
ts.configs.recommended,
importPlugin.flatConfigs.errors,
importPlugin.flatConfigs.warnings,
importPlugin.flatConfigs.typescript,
eslintPluginPrettierRecommended,
{
rules: {
"prettier/prettier": "error",
"constructor-super": "off",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {allowExpressions: true}],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unused-vars": ["error", {varsIgnorePattern: "^_"}],
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", {accessibility: "no-public"}],
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"import/no-extraneous-dependencies": [
"error",
{devDependencies: false, optionalDependencies: false, peerDependencies: false},
],
"func-call-spacing": "error",
"import/no-duplicates": "off",
"import/no-unresolved": ["error", {commonjs: false}],
"new-parens": "error",
"no-caller": "error",
"no-bitwise": "off",
"no-cond-assign": "error",
"no-consecutive-blank-lines": 0,
"no-console": "warn",
"no-var": "error",
"object-curly-spacing": ["error", "never"],
"object-literal-sort-keys": 0,
"no-prototype-builtins": 0,
"prefer-const": "error",
quotes: ["error", "double"],
semi: "error",
},
languageOptions: {
globals: {
BigInt: true,
},
parserOptions: {
ecmaVersion: 10,
project: "./tsconfig.json",
},
},
settings: {
"import/resolver": {
"typescript": {
}
}
},
},
{
files: ["**/test/**/*.ts"],
rules: {
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-console": "off"
},
}
);