-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
112 lines (112 loc) · 2.59 KB
/
.eslintrc.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
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
111
112
module.exports = {
root: true,
env: {
browser: false,
node: true,
es6: true,
commonjs: true,
jest: true
},
globals: {
ProcessEnv: true
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
ecmaFeatures: {
modules: true
},
project: './tsconfig.json'
},
extends: [
"plugin:@typescript-eslint/recommended",
"eslint:recommended",
"prettier",
"plugin:promise/recommended",
"plugin:jsdoc/recommended",
],
ignorePatterns: ["*.js"],
plugins: [
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/tslint",
"prettier",
"simple-import-sort",
"promise",
"jsdoc",
],
settings: {
"import/resolver": {
typescript: {
"alwaysTryTypes": true
}
},
"jsdoc": {
mode: "typescript"
}
},
rules: {
"prettier/prettier": ["error", {
printWidth: 120,
"trailingComma": "none",
"arrowParens": "always"
}],
"simple-import-sort/imports": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/no-empty-interface": "off",
"jsdoc/require-param": 2,
"jsdoc/require-description": ["error", {
contexts: ["any", "TSInterfaceDeclaration"]
}],
"jsdoc/newline-after-description": 2,
"jsdoc/require-param-name": 2,
"jsdoc/require-param-type": 2,
"jsdoc/require-returns": 2,
"jsdoc/require-returns-check": 2,
"jsdoc/require-returns-description": 2,
"jsdoc/require-returns-type": 2,
"jsdoc/require-jsdoc": ["error", {
publicOnly: true,
require: {
FunctionDeclaration: true,
MethodDefinition: false,
ClassDeclaration: true,
ArrowFunctionExpression: false,
FunctionExpression: false
},
contexts: ["any"]
}],
"eol-last": ["error", "always"],
"no-console": "off",
"curly": "error",
"object-shorthand": ["error", "always"],
"no-unused-vars": "off",
"no-warning-comments": ["warn", {
terms: ["TODO", "FIXME"],
location: "anywhere"
}],
"max-depth": ["error", {max: 3}],
"@typescript-eslint/tslint/config": ["error", {
rules: {
"completed-docs": [true, {
interfaces: {visibilities: ["exported"]}
}]
}
}]
},
overrides: [
{
files: ["**/*.test.*"],
rules: {
"no-magic-numbers": "off"
}
},{
files: ["**/*.js"],
plugins: [
"prettier"
]
}
]
}