Skip to content

Commit 94320c4

Browse files
authored
chore: update tslint to v5 and fix newly surfaced issues (#3958)
1 parent f396657 commit 94320c4

15 files changed

+17
-17
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"stylelint": "^7.8.0",
110110
"travis-after-modes": "0.0.7",
111111
"ts-node": "^3.0.0",
112-
"tslint": "^4.4.2",
112+
"tslint": "^5.0.0",
113113
"tslint-no-unused-var": "0.0.6",
114114
"typescript": "~2.1.1",
115115
"uglify-js": "^2.8.14",

src/lib/core/a11y/live-announcer.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function getLiveElement(): Element {
109109

110110
@Component({template: `<button (click)="announceText('Test')">Announce</button>`})
111111
class TestApp {
112-
constructor(public live: LiveAnnouncer) { };
112+
constructor(public live: LiveAnnouncer) { }
113113

114114
announceText(message: string) {
115115
this.live.announce(message);

src/lib/core/a11y/live-announcer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export class LiveAnnouncer {
6666

6767
export function LIVE_ANNOUNCER_PROVIDER_FACTORY(parentDispatcher: LiveAnnouncer, liveElement: any) {
6868
return parentDispatcher || new LiveAnnouncer(liveElement);
69-
};
69+
}
7070

7171
export const LIVE_ANNOUNCER_PROVIDER = {
7272
// If there is already a LiveAnnouncer available, use that. Otherwise, provide a new one.

src/lib/core/option/option.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export class MdOption {
172172
/** Emits the selection change event. */
173173
private _emitSelectionChangeEvent(isUserInput = false): void {
174174
this.onSelectionChange.emit(new MdOptionSelectionChange(this, isUserInput));
175-
};
175+
}
176176

177177
}
178178

src/lib/core/overlay/overlay-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class OverlayContainer {
5757

5858
export function OVERLAY_CONTAINER_PROVIDER_FACTORY(parentContainer: OverlayContainer) {
5959
return parentContainer || new OverlayContainer();
60-
};
60+
}
6161

6262
export const OVERLAY_CONTAINER_PROVIDER = {
6363
// If there is already an OverlayContainer available, use that. Otherwise, provide a new one.

src/lib/core/selection/pseudo-checkbox/pseudo-checkbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class MdPseudoCheckbox {
4141

4242
/** Color of the checkbox. */
4343
@Input()
44-
get color(): string { return this._color; };
44+
get color(): string { return this._color; }
4545
set color(value: string) {
4646
if (value) {
4747
let nativeElement = this._elementRef.nativeElement;

src/lib/core/style/focus-origin-monitor.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ class PlainButton {
464464
template: `<button cdkMonitorElementFocus (cdkFocusChange)="focusChanged($event)"></button>`
465465
})
466466
class ButtonWithFocusClasses {
467-
focusChanged(origin: FocusOrigin) {};
467+
focusChanged(origin: FocusOrigin) {}
468468
}
469469

470470

src/lib/core/testing/wrapped-error-message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
export function wrappedErrorMessage(e: Error) {
66
const escapedMessage = e.message.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
77
return new RegExp(escapedMessage);
8-
};
8+
}

src/lib/dialog/dialog-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface DialogPosition {
99
bottom?: string;
1010
left?: string;
1111
right?: string;
12-
};
12+
}
1313

1414
/**
1515
* Configuration for opening a modal dialog with the MdDialog service.

src/lib/icon/icon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked {
250250
export function ICON_REGISTRY_PROVIDER_FACTORY(
251251
parentRegistry: MdIconRegistry, http: Http, sanitizer: DomSanitizer) {
252252
return parentRegistry || new MdIconRegistry(http, sanitizer);
253-
};
253+
}
254254

255255
export const ICON_REGISTRY_PROVIDER = {
256256
// If there is already an MdIconRegistry available, use that. Otherwise, provide a new one.

src/lib/input/autosize.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const textareaStyleReset = `
116116

117117
@Component({
118118
template: `
119-
<textarea mdTextareaAutosize [mdAutosizeMinRows]="minRows" [mdAutosizeMaxRows]="maxRows"
119+
<textarea mdTextareaAutosize [mdAutosizeMinRows]="minRows" [mdAutosizeMaxRows]="maxRows"
120120
#autosize="mdTextareaAutosize">
121121
{{content}}
122122
</textarea>`,

src/lib/input/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class MdInputModule {
5252
}
5353

5454

55-
export * from './autosize'
55+
export * from './autosize';
5656
export * from './input-container';
5757
export * from './input-container-errors';
5858

src/lib/input/input-container.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class MdInputDirective {
143143

144144
/** Unique id of the element. */
145145
@Input()
146-
get id() { return this._id; };
146+
get id() { return this._id; }
147147
set id(value: string) {this._id = value || this._uid; }
148148

149149
/** Placeholder attribute of the element. */
@@ -299,7 +299,7 @@ export class MdInputContainer implements AfterViewInit, AfterContentInit {
299299
set dividerColor(value) { this.color = value; }
300300

301301
/** Whether the floating label should always float or not. */
302-
get _shouldAlwaysFloat() { return this._floatPlaceholder === 'always'; };
302+
get _shouldAlwaysFloat() { return this._floatPlaceholder === 'always'; }
303303

304304
/** Whether the placeholder can float or not. */
305305
get _canPlaceholderFloat() { return this._floatPlaceholder !== 'never'; }

src/lib/menu/menu-trigger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class MdMenuTrigger implements AfterViewInit, OnDestroy {
161161
if (!this._openedByMouse) {
162162
this.menu.focusFirstItem();
163163
}
164-
};
164+
}
165165

166166
/**
167167
* This method resets the menu when it's closed, most importantly restoring

src/lib/slider/slider.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,8 +1263,8 @@ class SliderWithValueGreaterThanMax { }
12631263
styles: [styles],
12641264
})
12651265
class SliderWithChangeHandler {
1266-
onChange() { };
1267-
onInput() { };
1266+
onChange() { }
1267+
onInput() { }
12681268
}
12691269

12701270
@Component({

0 commit comments

Comments
 (0)