-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
47 lines (45 loc) · 1.36 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
module.exports = {
root: true,
plugins: ["@typescript-eslint", "sonarjs"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
project: ["./tsconfig.json"],
},
settings: {
jsdoc: {
mode: "typescript",
},
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:sonarjs/recommended",
],
rules: {
// security
"sonarjs/cognitive-complexity": ["error", 60],
"sonarjs/no-unused-collection": "off",
// ESlint Default
"no-warning-comments": [
2,
{ terms: ["todo", "fixme", "bug"], location: "anywhere" },
],
"no-multiple-empty-lines": "error",
"no-proto": "error",
// typescript-eslint
"@typescript-eslint/no-empty-function": [
"error",
{ allow: ["arrowFunctions"] },
],
"@typescript-eslint/explicit-module-boundary-types": ["error"],
"@typescript-eslint/no-non-null-assertion": ["error"],
"@typescript-eslint/no-explicit-any": ["error"],
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/restrict-plus-operands": ["error", { "checkCompoundAssignments": true }],
"sonarjs/no-duplicate-string": "off",
},
};