-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
108 lines (108 loc) · 2.93 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
{
"root": true,
"env": {
"es2020": true,
"node": true,
"jest": true
},
"settings": {
"import/resolver": {
"typescript": {}
}
},
"extends": ["standard", "airbnb-base", "prettier", "plugin:sonarjs/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"plugins": ["@typescript-eslint", "spellcheck", "import", "sonarjs"],
"rules": {
"import/extensions": "off",
"no-underscore-dangle": "off",
"no-template-curly-in-string": "off",
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"no-shadow": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-invalid-this": "error",
"max-lines": ["error", { "max": 100, "skipBlankLines": true, "skipComments": true }],
"max-depth": ["error", 3],
"max-lines-per-function": ["error", { "max": 70, "skipBlankLines": true, "skipComments": true }],
"max-params": ["error", { "max": 4 }],
"no-alert": "error",
"no-console": "error",
"no-delete-var": "error",
"no-const-assign": "error",
"no-unreachable": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-implicit-any-catch": "error",
"id-length": [2, { "min": 3, "properties": "never" }],
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-magic-numbers": ["error", { "ignore": [-1, 0, 1] }],
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Za-z]",
"match": true
}
},
{
"selector": "enum",
"format": ["PascalCase"],
"custom": {
"regex": "Enum$",
"match": true
}
}
],
"spellcheck/spell-checker": [
1,
{
"comments": false,
"strings": false,
"templates": false,
"identifiers": true,
"lang": "en_US",
"skipWords": [
"href",
"enum",
"testid",
"msg",
"nome",
"lstatSync",
"readdir",
"lstat",
"docbytest",
"tsconfig"
],
"minLength": 3
}
],
"@typescript-eslint/typedef": [
"error",
{
"arrowParameter": true,
"variableDeclaration": true,
"variableDeclarationIgnoreFunction": true
}
]
},
"overrides": [
{
"files": ["*\\.test.ts", "*\\.spec.ts"],
"rules": {
"max-lines": "off",
"max-lines-per-function": "off"
}
}
]
}