Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update tslint to v5 and fix newly surfaced issues #3958

Merged
merged 1 commit into from
Apr 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/a11y/live-announcer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function getLiveElement(): Element {

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

announceText(message: string) {
this.live.announce(message);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/a11y/live-announcer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/option/option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class MdOption {
/** Emits the selection change event. */
private _emitSelectionChangeEvent(isUserInput = false): void {
this.onSelectionChange.emit(new MdOptionSelectionChange(this, isUserInput));
};
}

}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/overlay/overlay-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/selection/pseudo-checkbox/pseudo-checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/style/focus-origin-monitor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ class PlainButton {
template: `<button cdkMonitorElementFocus (cdkFocusChange)="focusChanged($event)"></button>`
})
class ButtonWithFocusClasses {
focusChanged(origin: FocusOrigin) {};
focusChanged(origin: FocusOrigin) {}
}


Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/testing/wrapped-error-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
export function wrappedErrorMessage(e: Error) {
const escapedMessage = e.message.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
return new RegExp(escapedMessage);
};
}
2 changes: 1 addition & 1 deletion src/lib/dialog/dialog-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface DialogPosition {
bottom?: string;
left?: string;
right?: string;
};
}

/**
* Configuration for opening a modal dialog with the MdDialog service.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/icon/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/input/autosize.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const textareaStyleReset = `

@Component({
template: `
<textarea mdTextareaAutosize [mdAutosizeMinRows]="minRows" [mdAutosizeMaxRows]="maxRows"
<textarea mdTextareaAutosize [mdAutosizeMinRows]="minRows" [mdAutosizeMaxRows]="maxRows"
#autosize="mdTextareaAutosize">
{{content}}
</textarea>`,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/input/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class MdInputModule {
}


export * from './autosize'
export * from './autosize';
export * from './input-container';
export * from './input-container-errors';

4 changes: 2 additions & 2 deletions src/lib/input/input-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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'; }
Expand Down
2 changes: 1 addition & 1 deletion src/lib/menu/menu-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/lib/slider/slider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1263,8 +1263,8 @@ class SliderWithValueGreaterThanMax { }
styles: [styles],
})
class SliderWithChangeHandler {
onChange() { };
onInput() { };
onChange() { }
onInput() { }
}

@Component({
Expand Down