Skip to content

Commit 278d0d3

Browse files
alan-agius4vikerman
authored andcommitted
style: enable tslint rules that were removed due to prettier
Prettier was disabled in this PR #14940 Until we re-introduce it again, we should re-introduce certain lint rules to maintaince a coding standards. Also, this increases the `max-line-length` to `140` instead of `100`.
1 parent 52741b4 commit 278d0d3

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

tslint.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"defocus": true,
1616
"import-groups": true,
1717
"no-global-tslint-disable": true,
18+
"single-eof-line": true,
1819
// ==================================================================================================
1920
// tslint-sonarts rules. See https://github.com/SonarSource/SonarTS
2021
// These rules are part of the bug detection section of tslint-sonarts
@@ -51,23 +52,47 @@
5152
"no-floating-promises": true,
5253
"no-implicit-dependencies": true,
5354
"no-import-side-effect": [true, {"ignore-module": "^(?!rxjs\/)"}],
55+
"align": [
56+
true,
57+
"elements",
58+
"members",
59+
"parameters",
60+
"statements"
61+
],
62+
"max-line-length": [true, 140],
5463
"no-inferrable-types": true,
5564
"class-name": true,
5665
"comment-format": [
5766
true,
5867
"check-space"
5968
],
69+
"indent": [
70+
true,
71+
"spaces"
72+
],
73+
"eofline": true,
74+
"import-spacing": true,
6075
"match-default-export-name": true,
6176
"newline-before-return": true,
77+
"no-consecutive-blank-lines": [true, 2],
6278
"no-duplicate-variable": true,
6379
"no-eval": true,
6480
"no-any": true,
6581
"no-arg": true,
6682
"no-debugger": true,
6783
"no-console": true,
6884
"no-internal-module": true,
85+
"no-trailing-whitespace": true,
6986
"no-unused-expression": true,
7087
"no-var-keyword": true,
88+
"one-line": [
89+
true,
90+
"check-catch",
91+
"check-else",
92+
"check-finally",
93+
"check-open-brace",
94+
"check-whitespace"
95+
],
7196
"ordered-imports": [
7297
true,
7398
{
@@ -76,6 +101,29 @@
76101
}
77102
],
78103
"prefer-const": true,
104+
"quotemark": [
105+
true,
106+
"single",
107+
"avoid-escape"
108+
],
109+
"semicolon": [true, "always"],
110+
"trailing-comma": [
111+
true,
112+
{
113+
"multiline": "always",
114+
"singleline": "never"
115+
}
116+
],
117+
"typedef-whitespace": [
118+
true,
119+
{
120+
"call-signature": "nospace",
121+
"index-signature": "nospace",
122+
"parameter": "nospace",
123+
"property-declaration": "nospace",
124+
"variable-declaration": "nospace"
125+
}
126+
],
79127
"curly": true,
80128
"file-header": [
81129
true,
@@ -87,6 +135,17 @@
87135
"check-format",
88136
"allow-leading-underscore",
89137
"allow-pascal-case"
138+
],
139+
"whitespace": [
140+
true,
141+
"check-branch",
142+
"check-decl",
143+
"check-module",
144+
"check-preblock",
145+
"check-operator",
146+
"check-separator",
147+
"check-type",
148+
"check-typecast"
90149
]
91150
}
92151
}

0 commit comments

Comments
 (0)