diff --git a/package.json b/package.json index e104ec74cbd7..ad4745123364 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "stylelint": "^7.8.0", "travis-after-modes": "0.0.7", "ts-node": "^3.0.0", - "tslint": "^4.4.2", + "tslint": "^5.0.0", "tslint-no-unused-var": "0.0.6", "typescript": "~2.1.1", "uglify-js": "^2.8.14", diff --git a/src/lib/core/a11y/live-announcer.spec.ts b/src/lib/core/a11y/live-announcer.spec.ts index a3c9f506f6c4..b8cf745e6128 100644 --- a/src/lib/core/a11y/live-announcer.spec.ts +++ b/src/lib/core/a11y/live-announcer.spec.ts @@ -109,7 +109,7 @@ function getLiveElement(): Element { @Component({template: ``}) class TestApp { - constructor(public live: LiveAnnouncer) { }; + constructor(public live: LiveAnnouncer) { } announceText(message: string) { this.live.announce(message); diff --git a/src/lib/core/a11y/live-announcer.ts b/src/lib/core/a11y/live-announcer.ts index a9dad6db3093..8348f7e6df6c 100644 --- a/src/lib/core/a11y/live-announcer.ts +++ b/src/lib/core/a11y/live-announcer.ts @@ -66,7 +66,7 @@ export class LiveAnnouncer { export function LIVE_ANNOUNCER_PROVIDER_FACTORY(parentDispatcher: LiveAnnouncer, liveElement: any) { return parentDispatcher || new LiveAnnouncer(liveElement); -}; +} export const LIVE_ANNOUNCER_PROVIDER = { // If there is already a LiveAnnouncer available, use that. Otherwise, provide a new one. diff --git a/src/lib/core/option/option.ts b/src/lib/core/option/option.ts index 7c9feaddea6e..5ce1e03e12ca 100644 --- a/src/lib/core/option/option.ts +++ b/src/lib/core/option/option.ts @@ -172,7 +172,7 @@ export class MdOption { /** Emits the selection change event. */ private _emitSelectionChangeEvent(isUserInput = false): void { this.onSelectionChange.emit(new MdOptionSelectionChange(this, isUserInput)); - }; + } } diff --git a/src/lib/core/overlay/overlay-container.ts b/src/lib/core/overlay/overlay-container.ts index 7b46fd1be3f3..f7c9649f76df 100644 --- a/src/lib/core/overlay/overlay-container.ts +++ b/src/lib/core/overlay/overlay-container.ts @@ -57,7 +57,7 @@ export class OverlayContainer { export function OVERLAY_CONTAINER_PROVIDER_FACTORY(parentContainer: OverlayContainer) { return parentContainer || new OverlayContainer(); -}; +} export const OVERLAY_CONTAINER_PROVIDER = { // If there is already an OverlayContainer available, use that. Otherwise, provide a new one. diff --git a/src/lib/core/selection/pseudo-checkbox/pseudo-checkbox.ts b/src/lib/core/selection/pseudo-checkbox/pseudo-checkbox.ts index d98bcf1b55c6..746f1a672651 100644 --- a/src/lib/core/selection/pseudo-checkbox/pseudo-checkbox.ts +++ b/src/lib/core/selection/pseudo-checkbox/pseudo-checkbox.ts @@ -41,7 +41,7 @@ export class MdPseudoCheckbox { /** Color of the checkbox. */ @Input() - get color(): string { return this._color; }; + get color(): string { return this._color; } set color(value: string) { if (value) { let nativeElement = this._elementRef.nativeElement; diff --git a/src/lib/core/style/focus-origin-monitor.spec.ts b/src/lib/core/style/focus-origin-monitor.spec.ts index fb4603be5dcf..f3b2577ac6a1 100644 --- a/src/lib/core/style/focus-origin-monitor.spec.ts +++ b/src/lib/core/style/focus-origin-monitor.spec.ts @@ -464,7 +464,7 @@ class PlainButton { template: `` }) class ButtonWithFocusClasses { - focusChanged(origin: FocusOrigin) {}; + focusChanged(origin: FocusOrigin) {} } diff --git a/src/lib/core/testing/wrapped-error-message.ts b/src/lib/core/testing/wrapped-error-message.ts index 4c1c4297163e..7b5bf620303c 100644 --- a/src/lib/core/testing/wrapped-error-message.ts +++ b/src/lib/core/testing/wrapped-error-message.ts @@ -5,4 +5,4 @@ export function wrappedErrorMessage(e: Error) { const escapedMessage = e.message.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&'); return new RegExp(escapedMessage); -}; +} diff --git a/src/lib/dialog/dialog-config.ts b/src/lib/dialog/dialog-config.ts index 30870ff7ef9a..96b4586e73d5 100644 --- a/src/lib/dialog/dialog-config.ts +++ b/src/lib/dialog/dialog-config.ts @@ -9,7 +9,7 @@ export interface DialogPosition { bottom?: string; left?: string; right?: string; -}; +} /** * Configuration for opening a modal dialog with the MdDialog service. diff --git a/src/lib/icon/icon.ts b/src/lib/icon/icon.ts index d9e0e038ca6d..81cf9fc1c5d0 100644 --- a/src/lib/icon/icon.ts +++ b/src/lib/icon/icon.ts @@ -250,7 +250,7 @@ export class MdIcon implements OnChanges, OnInit, AfterViewChecked { export function ICON_REGISTRY_PROVIDER_FACTORY( parentRegistry: MdIconRegistry, http: Http, sanitizer: DomSanitizer) { return parentRegistry || new MdIconRegistry(http, sanitizer); -}; +} export const ICON_REGISTRY_PROVIDER = { // If there is already an MdIconRegistry available, use that. Otherwise, provide a new one. diff --git a/src/lib/input/autosize.spec.ts b/src/lib/input/autosize.spec.ts index 947967658770..6ca9f10e32b5 100644 --- a/src/lib/input/autosize.spec.ts +++ b/src/lib/input/autosize.spec.ts @@ -116,7 +116,7 @@ const textareaStyleReset = ` @Component({ template: ` - `, diff --git a/src/lib/input/index.ts b/src/lib/input/index.ts index 2ee2fae294cb..f39a2f74a277 100644 --- a/src/lib/input/index.ts +++ b/src/lib/input/index.ts @@ -52,7 +52,7 @@ export class MdInputModule { } -export * from './autosize' +export * from './autosize'; export * from './input-container'; export * from './input-container-errors'; diff --git a/src/lib/input/input-container.ts b/src/lib/input/input-container.ts index cb290051aa35..8661b2719d1b 100644 --- a/src/lib/input/input-container.ts +++ b/src/lib/input/input-container.ts @@ -143,7 +143,7 @@ export class MdInputDirective { /** Unique id of the element. */ @Input() - get id() { return this._id; }; + get id() { return this._id; } set id(value: string) {this._id = value || this._uid; } /** Placeholder attribute of the element. */ @@ -299,7 +299,7 @@ export class MdInputContainer implements AfterViewInit, AfterContentInit { set dividerColor(value) { this.color = value; } /** Whether the floating label should always float or not. */ - get _shouldAlwaysFloat() { return this._floatPlaceholder === 'always'; }; + get _shouldAlwaysFloat() { return this._floatPlaceholder === 'always'; } /** Whether the placeholder can float or not. */ get _canPlaceholderFloat() { return this._floatPlaceholder !== 'never'; } diff --git a/src/lib/menu/menu-trigger.ts b/src/lib/menu/menu-trigger.ts index 0276fbc13ff4..b611138e935e 100644 --- a/src/lib/menu/menu-trigger.ts +++ b/src/lib/menu/menu-trigger.ts @@ -161,7 +161,7 @@ export class MdMenuTrigger implements AfterViewInit, OnDestroy { if (!this._openedByMouse) { this.menu.focusFirstItem(); } - }; + } /** * This method resets the menu when it's closed, most importantly restoring diff --git a/src/lib/slider/slider.spec.ts b/src/lib/slider/slider.spec.ts index 5dd79c75a52a..4cb452fe5e37 100644 --- a/src/lib/slider/slider.spec.ts +++ b/src/lib/slider/slider.spec.ts @@ -1263,8 +1263,8 @@ class SliderWithValueGreaterThanMax { } styles: [styles], }) class SliderWithChangeHandler { - onChange() { }; - onInput() { }; + onChange() { } + onInput() { } } @Component({