Skip to content

Commit 77f38d3

Browse files
gkalpakalxhub
authored andcommitted
style(docs-infra): fix docs examples for tslint rule semicolon (angular#38143)
This commit updates the docs examples to be compatible with the `semicolon` tslint rule. This is in preparation of updating the docs examples `tslint.json` to match the one generated for new Angular CLI apps in a future commit. PR Close angular#38143
1 parent 7c0f117 commit 77f38d3

File tree

21 files changed

+23
-23
lines changed

21 files changed

+23
-23
lines changed

aio/content/examples/built-in-directives/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class AppComponent implements OnInit {
8484
}
8585

8686
resetList() {
87-
this.resetItems()
87+
this.resetItems();
8888
this.itemsWithTrackByCountReset = 0;
8989
this.itemsNoTrackByCount = ++this.itemsNoTrackByCount;
9090
}

aio/content/examples/dependency-injection-in-action/src/app/runners-up.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ export function runnersUpFactory(take: number) {
2222
.join(', ');
2323
// #docregion factory-synopsis
2424
};
25-
};
25+
}
2626
// #enddocregion factory-synopsis

aio/content/examples/dependency-injection/src/app/providers.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class OldLogger {
107107
logs: string[] = [];
108108
log(message: string) {
109109
throw new Error('Should not call the old logger!');
110-
};
110+
}
111111
}
112112

113113
@Component({

aio/content/examples/elements/e2e/src/app.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('Elements', () => {
1414
const waitForText = (elem: ElementFinder) => {
1515
// Waiting for the element to have some text, makes the tests less flaky.
1616
browser.wait(async () => /\S/.test(await elem.getText()), 5000);
17-
}
17+
};
1818

1919
beforeEach(() => browser.get(''));
2020

aio/content/examples/form-validation/e2e/src/app.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function expectFormIsInvalid() {
160160

161161
function triggerAlterEgoValidation() {
162162
// alterEgo has updateOn set to 'blur', click outside of the input to trigger the blur event
163-
element(by.css('app-root')).click()
163+
element(by.css('app-root')).click();
164164
}
165165

166166
function waitForAlterEgoValidation() {

aio/content/examples/form-validation/src/app/shared/identity-revealed.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const identityRevealedValidator: ValidatorFn = (control: FormGroup): Vali
1919
})
2020
export class IdentityRevealedValidatorDirective implements Validator {
2121
validate(control: AbstractControl): ValidationErrors {
22-
return identityRevealedValidator(control)
22+
return identityRevealedValidator(control);
2323
}
2424
}
2525
// #enddocregion cross-validation-directive

aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export class HeroTaxReturnComponent {
3030
onCanceled() {
3131
this.flashMessage('Canceled');
3232
this.heroTaxReturnService.restoreTaxReturn();
33-
};
33+
}
3434

35-
onClose() { this.close.emit(); };
35+
onClose() { this.close.emit(); }
3636

3737
onSaved() {
3838
this.flashMessage('Saved');

aio/content/examples/http/src/app/request-cache.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface RequestCacheEntry {
1212
// #docregion request-cache
1313
export abstract class RequestCache {
1414
abstract get(req: HttpRequest<any>): HttpResponse<any> | undefined;
15-
abstract put(req: HttpRequest<any>, response: HttpResponse<any>): void
15+
abstract put(req: HttpRequest<any>, response: HttpResponse<any>): void;
1616
}
1717
// #enddocregion request-cache
1818

aio/content/examples/ngmodules/e2e/src/app.e2e-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ describe('NgModule-example', function () {
9797

9898
newContactButton.click().then(function () {
9999
input.click();
100-
nextButton.click()
100+
nextButton.click();
101101
expect(contacts.validationError.getText()).toBe('Name is required.');
102102
input.click();
103103
contacts.input.sendKeys('Watson');
104-
saveButton.click()
104+
saveButton.click();
105105
expect(contacts.contactNameHeader.getText()).toBe('Awesome Watson');
106106

107107
});

aio/content/examples/router/src/app/crisis-center/mock-crises.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export const CRISES: Crisis[] = [
66
{ id: 2, name: 'Sky Rains Great White Sharks' },
77
{ id: 3, name: 'Giant Asteroid Heading For Earth' },
88
{ id: 4, name: 'Procrastinators Meeting Delayed Again' },
9-
]
9+
];

0 commit comments

Comments
 (0)