forked from Azure/BatchExplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tslint.json
103 lines (101 loc) · 3.76 KB
/
tslint.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
{
"extends": "tslint:recommended",
"defaultSeverity": "error",
"rulesDirectory": [
"node_modules/codelyzer",
// "node_modules/rxjs-tslint",
"scripts/tslint"
],
"rules": {
// Custom rules
"forbidden-imports": [true, {}],
"no-parent-imports": [true, {}],
// TSLint override
"no-this-assignment": [true, {"allow-destructuring": true}],
"no-duplicate-imports": true,
"encoding": true,
"indent": [true, "spaces", 4],
"no-bitwise": false,
"object-literal-shorthand": false,
"adjacent-overload-signatures": false,
"max-classes-per-file": false,
"arrow-parens": false,
"no-inferrable-types": [false],
"interface-name": [ true, "never-prefix" ],
"no-string-literal": false,
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"], // https://github.com/palantir/tslint/issues/1489
"whitespace": [true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"ordered-imports": [true, {
"import-sources-order": "case-insensitive",
"named-imports-order": "lowercase-last",
"grouped-imports": true,
"groups": [
{"match": "^\\.\/.*\\.scss$", "order": 20}, // Have .scsss files after ts imports
{"match": ".*", "order": 10}
]
}],
"object-literal-sort-keys": false,
"arrow-return-shorthand": [true],
"ban": [
true,
["batchExplorerApp", "debugCrash"], // Show a warning if the main window is being shown on start for debug purposes
["this","debugTelemetry"], // Show a warning if the main window is being shown on start for debug purposes
{"name": ["log","debug"], "message": "Log.debug is for debug only don't leave in the code."}, // Show a warning if the main window is being shown on start for debug purposes
{"name": "fdescribe", "message": "Don't keep jasmine fit methods in the code."},
{"name": "fit", "message": "Don't keep jasmine fit methods in the code."},
{"name": "allowInsecureRequest", "message": "This is only for development with proxy don't leave in the code"}
],
"ban-types": [true, ["Error", "Try not to use a basic Error but a SanitizedError if possible or a custom error class"]],
"no-empty-interface": false,
"space-before-function-paren": [false],
"no-irregular-whitespace": true,
"no-invalid-template-strings": true,
"no-sparse-arrays": true,
"no-duplicate-switch-case": true,
"no-return-await": true,
"ban-comma-operator": true,
"prefer-while": true,
"comment-format": [true, "check-space"],
"prefer-const": true,
"file-name-casing": [true, "kebab-case"],
// "no-dynamic-delete": true,
// "prefer-readonly": true,
// Codelyzer rules(Angular2)
"contextual-life-cycle": true,
"decorator-not-allowed": true,
"directive-selector": [true, "attribute", "bl", "camelCase"],
"component-selector": [true, "element", "bl", "kebab-case"],
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-attribute-parameter-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"no-forward-ref": false,
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"pipe-naming": [false, "camelCase", "bl"],
"component-class-suffix": true,
"directive-class-suffix": true,
"import-destructuring-spacing": true,
"no-shadowed-variable": false,
"trackBy-function": true,
"banana-in-box": true,
"function-constructor": true
},
"jsRules": {
"object-literal-sort-keys": false,
"trailing-comma": [false]
},
"linterOptions": {
"exclude": [
"node_modules/**"
]
}
}