Skip to content

Commit 555ae74

Browse files
gkalpakjosephperrott
authored andcommitted
refactor(docs-infra): more closely align tslint.json with CLI (angular#39018)
This commit re-organizes the `tslint.json` configuration file to more closely align with the one generated by the latest Angular CLI for new apps. This makes it easier to see the difference with new CLI versions in the future and keep our `tslint.json` up-to-date (while keeping our own rules). NOTE: This commit only re-orders rules and removes redundant ones. It does not change the linting behavior. PR Close angular#39018
1 parent 7dd0db6 commit 555ae74

File tree

1 file changed

+47
-53
lines changed

1 file changed

+47
-53
lines changed

aio/tslint.json

Lines changed: 47 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,16 @@
1111
]
1212
},
1313
"array-type": false,
14-
"arrow-parens": false,
1514
"arrow-return-shorthand": true,
1615
"ban": [
1716
true,
1817
{"name": "fdescribe", "message": "Don't keep jasmine focus methods."},
1918
{"name": "fit", "message": "Don't keep jasmine focus methods."}
2019
],
21-
"component-class-suffix": true,
22-
"component-selector": [
23-
true,
24-
"element",
25-
"aio",
26-
"kebab-case"
27-
],
28-
"contextual-lifecycle": true,
2920
"curly": true,
3021
"deprecation": {
31-
"severity": "warn"
22+
"severity": "warning"
3223
},
33-
"directive-class-suffix": true,
34-
"directive-selector": [
35-
true,
36-
"attribute",
37-
"aio",
38-
"camelCase"
39-
],
4024
"eofline": true,
4125
"import-blacklist": [
4226
true,
@@ -48,13 +32,11 @@
4832
"spaces"
4933
]
5034
},
51-
"interface-name": false,
5235
"max-classes-per-file": false,
5336
"max-line-length": [
5437
true,
5538
140
5639
],
57-
"member-access": false,
5840
"member-ordering": [
5941
true,
6042
{
@@ -66,8 +48,6 @@
6648
]
6749
}
6850
],
69-
"no-conflicting-lifecycle": true,
70-
"no-consecutive-blank-lines": false,
7151
"no-console": [
7252
true,
7353
"debug",
@@ -77,24 +57,15 @@
7757
"trace"
7858
],
7959
"no-empty": false,
80-
"no-host-metadata-property": true,
8160
"no-inferrable-types": [
8261
true,
8362
"ignore-params"
8463
],
85-
"no-input-rename": true,
86-
"no-inputs-metadata-property": true,
87-
"no-output-native": true,
88-
"no-output-on-prefix": true,
89-
"no-output-rename": true,
90-
"no-outputs-metadata-property": true,
9164
"no-string-literal": false,
9265
"no-switch-case-fall-through": true,
9366
"no-var-requires": false,
9467
"object-literal-key-quotes": false,
95-
"object-literal-sort-keys": false,
9668
"only-arrow-functions": false,
97-
"ordered-imports": false,
9869
"quotemark": [
9970
true,
10071
"single"
@@ -113,9 +84,6 @@
11384
"named": "never"
11485
}
11586
},
116-
"template-banana-in-box": true,
117-
"template-no-negated-async": true,
118-
"trailing-comma": false,
11987
"typedef-whitespace": {
12088
"options": [
12189
{
@@ -134,35 +102,61 @@
134102
}
135103
]
136104
},
137-
"use-lifecycle-interface": true,
138-
"use-pipe-transform-interface": true,
139-
"variable-name": [
140-
true,
141-
"allow-leading-underscore",
142-
"allow-pascal-case",
143-
"ban-keywords",
144-
"check-format",
145-
"require-const-for-all-caps"
146-
],
105+
"variable-name": {
106+
"options": [
107+
"ban-keywords",
108+
"check-format",
109+
"allow-leading-underscore",
110+
"allow-pascal-case",
111+
"require-const-for-all-caps"
112+
]
113+
},
114+
"whitespace": {
115+
"options": [
116+
"check-branch",
117+
"check-decl",
118+
"check-operator",
119+
"check-separator",
120+
"check-type",
121+
"check-typecast"
122+
]
123+
},
124+
"component-class-suffix": true,
125+
"contextual-lifecycle": true,
126+
"directive-class-suffix": true,
127+
"no-conflicting-lifecycle": true,
128+
"no-host-metadata-property": true,
129+
"no-input-rename": true,
130+
"no-inputs-metadata-property": true,
131+
"no-output-native": true,
132+
"no-output-on-prefix": true,
133+
"no-output-rename": true,
134+
"no-outputs-metadata-property": true,
147135
"template-accessibility-alt-text": true,
148136
"template-accessibility-elements-content": true,
149137
"template-accessibility-label-for": true,
150138
"template-accessibility-tabindex-no-positive": true,
151139
"template-accessibility-table-scope": true,
152140
"template-accessibility-valid-aria": true,
141+
"template-banana-in-box": true,
153142
"template-click-events-have-key-events": true,
154143
"template-mouse-events-have-key-events": true,
155144
"template-no-autofocus": true,
156145
"template-no-distracting-elements": true,
157-
"whitespace": {
158-
"options": [
159-
"check-branch",
160-
"check-decl",
161-
"check-operator",
162-
"check-separator",
163-
"check-type",
164-
"check-typecast"
165-
]
166-
}
146+
"template-no-negated-async": true,
147+
"use-lifecycle-interface": true,
148+
"use-pipe-transform-interface": true,
149+
"directive-selector": [
150+
true,
151+
"attribute",
152+
"aio",
153+
"camelCase"
154+
],
155+
"component-selector": [
156+
true,
157+
"element",
158+
"aio",
159+
"kebab-case"
160+
]
167161
}
168162
}

0 commit comments

Comments
 (0)