-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
110 lines (110 loc) · 3.85 KB
/
.eslintrc.json
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
"env": {
"es6": true,
"node": true,
"jest": true,
"jest/globals": true
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"overrides": [
{
"files": [".js", ".ts"]
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["n", "@typescript-eslint", "import", "jest", "security"],
"extends": [
"plugin:n/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:security/recommended"
],
"rules": {
// code
"max-params": ["warn", 3],
"max-depth": ["error", 3],
"max-statements-per-line": ["error", { "max": 1 }],
"max-lines": ["error", { "max": 1000, "skipBlankLines": true, "skipComments": true }],
"max-lines-per-function": ["warn", { "max": 50, "skipBlankLines": true, "skipComments": true }],
"@typescript-eslint/ban-ts-comment": ["warn"],
"@typescript-eslint/interface-name-prefix": [0, "never"],
"arrow-parens": ["error"],
"quote-props": ["error", "consistent-as-needed", { "numbers": true }],
"no-unused-vars": 0,
"no-useless-escape": "error",
"no-empty-pattern": "error",
"no-eval": "error",
"no-implied-eval": "error",
"no-prototype-builtins": "error",
"prefer-const": 0,
"n/no-sync": 0,
"n/no-process-exit": 0,
"n/exports-style": ["error", "module.exports"],
"n/no-unpublished-require": 0,
"n/no-extraneous-import": 0,
"n/no-deprecated-api": ["warn"],
"n/no-missing-require": [
"error",
{
"tryExtensions": [".ts", ".js", ".d.ts", ".json", ".node"],
"allowModules": ["clean-webpack-plugin", "copy-webpack-plugin"]
}
],
"n/no-missing-import": 0,
"n/no-unpublished-import": 0,
"n/no-unsupported-features/es-syntax": 0,
"n/no-unsupported-features/node-builtins": [
"error",
{
"ignores": ["fs/promises.glob"]
}
],
"import/extensions": [
"error",
{
"ts": "never",
"js": "never",
"json": "always"
}
],
"import/named": "warn",
"import/no-duplicates": "error",
"import/no-unresolved": 0,
"import/default": 0,
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-inferrable-types": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/consistent-type-imports": ["error", { "prefer": "type-imports" }],
// Style
"max-len": ["error", { "code": 200 }],
"indent": ["error", 4, { "SwitchCase": 1 }],
"linebreak-style": ["warn", "windows"],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"brace-style": ["error", "stroustrup"],
"object-curly-spacing": ["error", "always"],
"no-mixed-spaces-and-tabs": "error",
"arrow-spacing": ["error"],
"comma-dangle": ["error", "never"],
"comma-style": ["error"],
"no-extra-semi": "error",
"comma-spacing": "error",
"space-in-parens": ["error", "never"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
"keyword-spacing": "error",
"one-var": ["error", "never"]
}
}