-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.cjs
80 lines (80 loc) · 2.12 KB
/
.eslintrc.cjs
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
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
tsconfigRootDir: __dirname,
sourceType: "module",
},
plugins: ["@typescript-eslint/eslint-plugin"],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: [".eslintrc.js"],
rules: {
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-invalid-this": "off",
"@typescript-eslint/no-unused-expressions": "warn",
"@typescript-eslint/return-await": "warn",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/naming-convention": [
"error",
{ selector: "default", format: ["strictCamelCase"] },
{
selector: "variable",
format: ["strictCamelCase", "UPPER_CASE", "PascalCase"],
},
{
selector: "parameter",
modifiers: ["unused"],
format: ["strictCamelCase"],
leadingUnderscore: "allow",
},
{ selector: "property", format: null },
{ selector: "typeProperty", format: null },
{ selector: "typeLike", format: ["StrictPascalCase"] },
{ selector: "enumMember", format: ["UPPER_CASE"] },
],
"no-useless-return": "error",
"no-constant-condition": "warn",
"max-len": [
"error",
{
code: 200,
},
],
"max-lines": [
"error",
{
max: 1000,
},
],
"no-multiple-empty-lines": [
"error",
{
max: 2,
maxEOF: 1,
},
],
"no-console": "error",
"no-mixed-operators": "error",
"keyword-spacing": "error",
// 'multiline-ternary': ['error', 'never'],
"no-undef": "error",
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": "error",
},
};