From 5b08a880f719fcac1d77419fe60ffc3d51c2ae7e Mon Sep 17 00:00:00 2001 From: WilliamKoza Date: Tue, 22 Jan 2019 08:17:20 +0100 Subject: [PATCH] style(docs-infra): Active tslint rule `semicolon` (#28282) PR Close #28282 --- aio/src/app/app.component.spec.ts | 4 ++-- aio/src/app/custom-elements/api/api-list.component.ts | 2 +- aio/src/app/custom-elements/api/api.service.ts | 2 +- .../contributor/contributor-list.component.spec.ts | 2 +- aio/src/app/custom-elements/elements-loader.spec.ts | 2 +- .../getting-started/ng-for/ng-for.component.spec.ts | 2 +- .../getting-started/ng-if/ng-if.component.spec.ts | 2 +- aio/src/app/custom-elements/resource/resource.service.ts | 2 +- aio/src/app/shared/deployment.service.ts | 2 +- aio/tslint.json | 1 + 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/aio/src/app/app.component.spec.ts b/aio/src/app/app.component.spec.ts index f57db5b5aa..8e9d621a2d 100644 --- a/aio/src/app/app.component.spec.ts +++ b/aio/src/app/app.component.spec.ts @@ -52,7 +52,7 @@ describe('AppComponent', () => { await newDocPromise; // Wait for the new document to be fetched. fixture.detectChanges(); // Propagate document change to the view (i.e to `DocViewer`). await docRenderedPromise; // Wait for the `docRendered` event. - }; + } function initializeTest(waitForDoc = true) { fixture = TestBed.createComponent(AppComponent); @@ -73,7 +73,7 @@ describe('AppComponent', () => { tocService = de.injector.get(TocService); return waitForDoc && awaitDocRendered(); - }; + } describe('with proper DocViewer', () => { diff --git a/aio/src/app/custom-elements/api/api-list.component.ts b/aio/src/app/custom-elements/api/api-list.component.ts index 8711cf80e8..568ea0f7d9 100644 --- a/aio/src/app/custom-elements/api/api-list.component.ts +++ b/aio/src/app/custom-elements/api/api-list.component.ts @@ -125,7 +125,7 @@ export class ApiListComponent implements OnInit { return status === 'all' || status === item.stability || (status === 'security-risk' && item.securityRisk); - }; + } function matchesType() { return type === 'all' || type === item.docType; diff --git a/aio/src/app/custom-elements/api/api.service.ts b/aio/src/app/custom-elements/api/api.service.ts index fdfb54cfcf..39a8dfb0cf 100644 --- a/aio/src/app/custom-elements/api/api.service.ts +++ b/aio/src/app/custom-elements/api/api.service.ts @@ -54,7 +54,7 @@ export class ApiService implements OnDestroy { section.items.every(item => item.stability === 'deprecated'); }); })); - }; + } constructor(private http: HttpClient, private logger: Logger) { } diff --git a/aio/src/app/custom-elements/contributor/contributor-list.component.spec.ts b/aio/src/app/custom-elements/contributor/contributor-list.component.spec.ts index 4ecb04612c..6d7b8e40a0 100644 --- a/aio/src/app/custom-elements/contributor/contributor-list.component.spec.ts +++ b/aio/src/app/custom-elements/contributor/contributor-list.component.spec.ts @@ -79,7 +79,7 @@ describe('ContributorListComponent', () => { return comp; } - interface SearchResult { [index: string]: string; }; + interface SearchResult { [index: string]: string; } class TestLocationService { searchResult: SearchResult = {}; diff --git a/aio/src/app/custom-elements/elements-loader.spec.ts b/aio/src/app/custom-elements/elements-loader.spec.ts index 817dd71a57..a22304faac 100644 --- a/aio/src/app/custom-elements/elements-loader.spec.ts +++ b/aio/src/app/custom-elements/elements-loader.spec.ts @@ -245,7 +245,7 @@ class FakeComponentFactory extends ComponentFactory { rootSelectorOrNode?: string | any, ngModule?: NgModuleRef): ComponentRef { return jasmine.createSpy('ComponentRef') as any; - }; + } } class FakeComponentFactoryResolver extends ComponentFactoryResolver { diff --git a/aio/src/app/custom-elements/getting-started/ng-for/ng-for.component.spec.ts b/aio/src/app/custom-elements/getting-started/ng-for/ng-for.component.spec.ts index f5f5c8e9aa..3f7ba6d41b 100644 --- a/aio/src/app/custom-elements/getting-started/ng-for/ng-for.component.spec.ts +++ b/aio/src/app/custom-elements/getting-started/ng-for/ng-for.component.spec.ts @@ -37,6 +37,6 @@ describe('Getting Started NgFor Component', () => { component.parseError$.subscribe(error => { expect(error).toBeTruthy(); - }) + }); }); }); diff --git a/aio/src/app/custom-elements/getting-started/ng-if/ng-if.component.spec.ts b/aio/src/app/custom-elements/getting-started/ng-if/ng-if.component.spec.ts index c218e91278..09d297c5a7 100644 --- a/aio/src/app/custom-elements/getting-started/ng-if/ng-if.component.spec.ts +++ b/aio/src/app/custom-elements/getting-started/ng-if/ng-if.component.spec.ts @@ -46,6 +46,6 @@ describe('Getting Started NgIf Component', () => { component.parseError$.subscribe(error => { expect(error).toBeTruthy(); - }) + }); }); }); diff --git a/aio/src/app/custom-elements/resource/resource.service.ts b/aio/src/app/custom-elements/resource/resource.service.ts index 9fc921e092..ea0496f8bd 100644 --- a/aio/src/app/custom-elements/resource/resource.service.ts +++ b/aio/src/app/custom-elements/resource/resource.service.ts @@ -26,7 +26,7 @@ export class ResourceService { (categories as ConnectableObservable).connect(); return categories; - }; + } } // Extract sorted Category[] from resource JSON data diff --git a/aio/src/app/shared/deployment.service.ts b/aio/src/app/shared/deployment.service.ts index 6a3f0ee79a..3a77b91c93 100644 --- a/aio/src/app/shared/deployment.service.ts +++ b/aio/src/app/shared/deployment.service.ts @@ -14,4 +14,4 @@ export class Deployment { mode: string = this.location.search()['mode'] || environment.mode; constructor(private location: LocationService) {} -}; +} diff --git a/aio/tslint.json b/aio/tslint.json index 693598c511..bb06be5d56 100644 --- a/aio/tslint.json +++ b/aio/tslint.json @@ -75,6 +75,7 @@ ], "radix": true, "semicolon": [ + true, "always" ], "triple-equals": [