-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtslint.rules.js
More file actions
34 lines (33 loc) · 854 Bytes
/
tslint.rules.js
File metadata and controls
34 lines (33 loc) · 854 Bytes
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
const isProd = process.env.NODE_ENV === "production";
exports.rules = {
prettier: {
severity: isProd ? "error" : "warning"
},
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-leading-underscore",
"allow-pascal-case"
],
"cyclomatic-complexity": {
severity: isProd ? "error" : "warning"
},
"prefer-const": {
severity: isProd ? "error" : "warning"
},
"no-console": {
severity: isProd ? "error" : "warning",
options: ["debug", "info", "log", "time", "timeEnd", "trace"]
},
"no-debugger": {
severity: isProd ? "error" : "warning"
},
"no-duplicate-super": true,
"no-duplicate-switch-case": true,
"no-return-await": true,
"no-string-throw": true,
"no-this-assignment": [true, { "allow-destructuring": true }],
"no-unsafe-finally": true,
"no-var-keyword": true
};