Skip to content

Commit ab17c80

Browse files
committed
feat(@angular/cli): extend tslnit config from recommended
no need to duplicate rules new rules can be applied without updating, when new tslint is used Fixes: #6179
1 parent 0d3d9ef commit ab17c80

File tree

4 files changed

+20
-79
lines changed

4 files changed

+20
-79
lines changed

packages/@angular/cli/blueprints/ng/files/__path__/polyfills.ts

+3-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* BROWSER POLYFILLS
1919
*/
2020

21-
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
21+
/** IE9, IE10 and IE11 requires all of the following polyfills. */
2222
// import 'core-js/es6/symbol';
2323
// import 'core-js/es6/object';
2424
// import 'core-js/es6/function';
@@ -39,24 +39,18 @@
3939
/** IE10 and IE11 requires the following to support `@angular/animation`. */
4040
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
4141

42-
43-
/** Evergreen browsers require these. **/
42+
/** Evergreen browsers require these. */
4443
import 'core-js/es6/reflect';
4544
import 'core-js/es7/reflect';
4645

47-
48-
/** ALL Firefox browsers require the following to support `@angular/animation`. **/
46+
/** ALL Firefox browsers require the following to support `@angular/animation`. */
4947
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
5048

51-
52-
5349
/***************************************************************************************************
5450
* Zone JS is required by Angular itself.
5551
*/
5652
import 'zone.js/dist/zone'; // Included with Angular CLI.
5753

58-
59-
6054
/***************************************************************************************************
6155
* APPLICATION IMPORTS
6256
*/

packages/@angular/cli/blueprints/ng/files/__path__/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ declare const __karma__: any;
1717
declare const require: any;
1818

1919
// Prevent Karma from running prematurely.
20-
__karma__.loaded = function () {};
20+
__karma__.loaded = () => { };
2121

2222
// First, initialize the Angular testing environment.
2323
getTestBed().initTestEnvironment(

packages/@angular/cli/blueprints/ng/files/e2e/app.e2e-spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ describe('<%= htmlComponentName %> App', () => {
77
page = new <%= jsComponentName %>Page();
88
});
99

10-
it('should display welcome message', done => {
10+
it('should display welcome message', (done) => {
1111
page.navigateTo();
1212
page.getParagraphText()
13-
.then(msg => expect(msg).toEqual('Welcome to <%= prefix %>!!'))
13+
.then((msg) => expect(msg).toEqual('Welcome to <%= prefix %>!!'))
1414
.then(done, done.fail);
1515
});
1616
});
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
11
{
2-
"rulesDirectory": [
3-
"node_modules/codelyzer"
2+
"extends": [
3+
"tslint:recommended"
44
],
55
"rules": {
6-
"arrow-return-shorthand": true,
7-
"callable-types": true,
8-
"class-name": true,
9-
"comment-format": [
10-
true,
11-
"check-space"
12-
],
13-
"curly": true,
14-
"eofline": true,
15-
"forin": true,
166
"import-blacklist": [
177
true,
188
"rxjs"
199
],
20-
"import-spacing": true,
21-
"indent": [
10+
"interface-name": [
2211
true,
23-
"spaces"
12+
"never-prefix"
2413
],
25-
"interface-over-type-literal": true,
26-
"label-position": true,
2714
"max-line-length": [
2815
true,
2916
140
@@ -34,8 +21,6 @@
3421
"static-before-instance",
3522
"variables-before-functions"
3623
],
37-
"no-arg": true,
38-
"no-bitwise": true,
3924
"no-console": [
4025
true,
4126
"debug",
@@ -44,69 +29,28 @@
4429
"timeEnd",
4530
"trace"
4631
],
47-
"no-construct": true,
48-
"no-debugger": true,
49-
"no-duplicate-super": true,
5032
"no-empty": false,
51-
"no-empty-interface": true,
52-
"no-eval": true,
5333
"no-inferrable-types": [
5434
true,
5535
"ignore-params"
5636
],
57-
"no-misused-new": true,
5837
"no-non-null-assertion": true,
59-
"no-shadowed-variable": true,
6038
"no-string-literal": false,
61-
"no-string-throw": true,
6239
"no-switch-case-fall-through": true,
63-
"no-trailing-whitespace": true,
64-
"no-unnecessary-initializer": true,
65-
"no-unused-expression": true,
6640
"no-use-before-declare": true,
67-
"no-var-keyword": true,
6841
"object-literal-sort-keys": false,
69-
"one-line": [
70-
true,
71-
"check-open-brace",
72-
"check-catch",
73-
"check-else",
74-
"check-whitespace"
42+
"ordered-imports": [
43+
false
7544
],
76-
"prefer-const": true,
7745
"quotemark": [
7846
true,
79-
"single"
80-
],
81-
"radix": true,
82-
"semicolon": [
83-
"always"
47+
"single",
48+
"avoid-escape"
8449
],
85-
"triple-equals": [
86-
true,
87-
"allow-null-check"
50+
"trailing-comma": [
51+
false
8852
],
89-
"typedef-whitespace": [
90-
true,
91-
{
92-
"call-signature": "nospace",
93-
"index-signature": "nospace",
94-
"parameter": "nospace",
95-
"property-declaration": "nospace",
96-
"variable-declaration": "nospace"
97-
}
98-
],
99-
"typeof-compare": true,
100-
"unified-signatures": true,
10153
"variable-name": false,
102-
"whitespace": [
103-
true,
104-
"check-branch",
105-
"check-decl",
106-
"check-operator",
107-
"check-separator",
108-
"check-type"
109-
],
11054
"directive-selector": [
11155
true,
11256
"attribute",
@@ -131,5 +75,8 @@
13175
"no-access-missing-member": true,
13276
"templates-use-public": true,
13377
"invoke-injectable": true
134-
}
78+
},
79+
"rulesDirectory": [
80+
"node_modules/codelyzer"
81+
]
13582
}

0 commit comments

Comments
 (0)