Skip to content
Permalink
Browse files

fix(all): updated tslint rules to latest

  • Loading branch information...
manucorporat committed Jul 29, 2018
1 parent d1969bd commit 92e21a8cf30b4fdd7cdbb8e561e634135376d998
Showing with 548 additions and 576 deletions.
  1. +2 βˆ’2 core/src/components.d.ts
  2. +5 βˆ’5 core/src/components/action-sheet/action-sheet.tsx
  3. +4 βˆ’4 core/src/components/action-sheet/animations/ios.enter.ts
  4. +4 βˆ’4 core/src/components/action-sheet/animations/ios.leave.ts
  5. +4 βˆ’4 core/src/components/action-sheet/animations/md.enter.ts
  6. +4 βˆ’4 core/src/components/action-sheet/animations/md.leave.ts
  7. +2 βˆ’2 core/src/components/alert/alert-interface.ts
  8. +8 βˆ’8 core/src/components/alert/alert.tsx
  9. +4 βˆ’4 core/src/components/alert/animations/ios.enter.ts
  10. +4 βˆ’4 core/src/components/alert/animations/ios.leave.ts
  11. +4 βˆ’4 core/src/components/alert/animations/md.enter.ts
  12. +4 βˆ’4 core/src/components/alert/animations/md.leave.ts
  13. +5 βˆ’7 core/src/components/animation-controller/animation-interface.tsx
  14. +18 βˆ’18 core/src/components/animation-controller/animator.tsx
  15. +1 βˆ’0 core/src/components/animation-controller/constants.ts
  16. +3 βˆ’3 core/src/components/animation-controller/transition-end.ts
  17. +2 βˆ’2 core/src/components/backdrop/backdrop.tsx
  18. +5 βˆ’5 core/src/components/button/button.tsx
  19. +1 βˆ’1 core/src/components/content/content.tsx
  20. +8 βˆ’8 core/src/components/datetime/datetime-util.ts
  21. +6 βˆ’6 core/src/components/datetime/datetime.tsx
  22. +8 βˆ’8 core/src/components/gesture-controller/test/gesture-controller.spec.tsx
  23. +1 βˆ’3 core/src/components/gesture/gesture-interface.ts
  24. +1 βˆ’1 core/src/components/infinite-scroll/infinite-scroll.tsx
  25. +2 βˆ’2 core/src/components/input/input.tsx
  26. +3 βˆ’3 core/src/components/item-sliding/item-sliding.tsx
  27. +1 βˆ’1 core/src/components/item/item.tsx
  28. +4 βˆ’4 core/src/components/loading/animations/ios.enter.ts
  29. +4 βˆ’4 core/src/components/loading/animations/ios.leave.ts
  30. +4 βˆ’4 core/src/components/loading/animations/md.enter.ts
  31. +4 βˆ’4 core/src/components/loading/animations/md.leave.ts
  32. +2 βˆ’2 core/src/components/loading/loading.tsx
  33. +2 βˆ’2 core/src/components/menu-controller/animations/base.ts
  34. +4 βˆ’4 core/src/components/menu-controller/animations/overlay.ts
  35. +5 βˆ’5 core/src/components/menu-controller/animations/push.ts
  36. +3 βˆ’3 core/src/components/menu-controller/animations/reveal.ts
  37. +13 βˆ’11 core/src/components/menu-controller/menu-controller.ts
  38. +1 βˆ’1 core/src/components/menu-toggle/menu-toggle.tsx
  39. +3 βˆ’3 core/src/components/menu/menu.tsx
  40. +4 βˆ’4 core/src/components/modal/animations/ios.enter.ts
  41. +4 βˆ’4 core/src/components/modal/animations/ios.leave.ts
  42. +4 βˆ’4 core/src/components/modal/animations/md.enter.ts
  43. +4 βˆ’4 core/src/components/modal/animations/md.leave.ts
  44. +5 βˆ’5 core/src/components/modal/modal.tsx
  45. +4 βˆ’10 core/src/components/nav/nav-interface.ts
  46. +17 βˆ’17 core/src/components/nav/nav.tsx
  47. +26 βˆ’27 core/src/components/nav/test/nav-controller.spec.ts
  48. +2 βˆ’2 core/src/components/nav/view-controller.ts
  49. +4 βˆ’4 core/src/components/picker-column/picker-column.tsx
  50. +4 βˆ’4 core/src/components/picker/animations/ios.enter.ts
  51. +4 βˆ’4 core/src/components/picker/animations/ios.leave.ts
  52. +1 βˆ’1 core/src/components/picker/picker-interface.ts
  53. +2 βˆ’5 core/src/components/picker/picker.tsx
  54. +4 βˆ’4 core/src/components/popover/animations/ios.enter.ts
  55. +4 βˆ’4 core/src/components/popover/animations/ios.leave.ts
  56. +6 βˆ’6 core/src/components/popover/animations/md.enter.ts
  57. +4 βˆ’4 core/src/components/popover/animations/md.leave.ts
  58. +4 βˆ’4 core/src/components/popover/popover.tsx
  59. +6 βˆ’6 core/src/components/range-knob/range-knob.tsx
  60. +3 βˆ’3 core/src/components/reorder-group/reorder-group.tsx
  61. +3 βˆ’3 core/src/components/ripple-effect/ripple-effect.tsx
  62. +6 βˆ’6 core/src/components/router-outlet/route-outlet.tsx
  63. +4 βˆ’4 core/src/components/router/router.tsx
  64. +14 βˆ’14 core/src/components/router/test/e2e.spec.tsx
  65. +38 βˆ’38 core/src/components/router/test/matching.spec.tsx
  66. +8 βˆ’8 core/src/components/router/test/parser.spec.tsx
  67. +3 βˆ’3 core/src/components/router/test/path.spec.tsx
  68. +2 βˆ’1 core/src/components/router/utils/dom.ts
  69. +2 βˆ’2 core/src/components/router/utils/interface.ts
  70. +8 βˆ’8 core/src/components/router/utils/matching.ts
  71. +1 βˆ’1 core/src/components/router/utils/parser.ts
  72. +1 βˆ’1 core/src/components/router/utils/path.ts
  73. +1 βˆ’3 core/src/components/scroll/scroll-interface.ts
  74. +8 βˆ’8 core/src/components/scroll/scroll.tsx
  75. +1 βˆ’1 core/src/components/searchbar/searchbar.tsx
  76. +1 βˆ’1 core/src/components/segment-button/segment-button.tsx
  77. +1 βˆ’1 core/src/components/segment/segment.tsx
  78. +1 βˆ’1 core/src/components/select-popover/select-popover-interface.ts
  79. +17 βˆ’14 core/src/components/select/select.tsx
  80. +1 βˆ’1 core/src/components/slides/slides.tsx
  81. +2 βˆ’2 core/src/components/spinner/spinner-configs.ts
  82. +2 βˆ’2 core/src/components/split-pane/split-pane.tsx
  83. +2 βˆ’2 core/src/components/tab/tab.tsx
  84. +8 βˆ’8 core/src/components/tabbar/tabbar.tsx
  85. +8 βˆ’8 core/src/components/tabs/tabs.tsx
  86. +5 βˆ’5 core/src/components/tap-click/tap-click.tsx
  87. +1 βˆ’1 core/src/components/textarea/textarea.tsx
  88. +3 βˆ’3 core/src/components/title/title.ios.scss
  89. +1 βˆ’1 core/src/components/title/title.md.scss
  90. +3 βˆ’3 core/src/components/toast/animations/ios.enter.ts
  91. +3 βˆ’3 core/src/components/toast/animations/ios.leave.ts
  92. +3 βˆ’3 core/src/components/toast/animations/md.enter.ts
  93. +3 βˆ’3 core/src/components/toast/animations/md.leave.ts
  94. +4 βˆ’4 core/src/components/toast/toast.tsx
  95. +35 βˆ’35 core/src/components/virtual-scroll/test/virtual-scroll-utils.spec.ts
  96. +1 βˆ’1 core/src/components/virtual-scroll/virtual-scroll-interface.ts
  97. +5 βˆ’5 core/src/components/virtual-scroll/virtual-scroll-utils.tsx
  98. +2 βˆ’2 core/src/components/virtual-scroll/virtual-scroll.tsx
  99. +17 βˆ’17 core/src/utils/animations/ios.transition.ts
  100. +4 βˆ’4 core/src/utils/animations/md.transition.ts
  101. +2 βˆ’2 core/src/utils/framework-delegate.ts
  102. +5 βˆ’5 core/src/utils/helpers.ts
  103. +1 βˆ’1 core/src/utils/input-interface.ts
  104. +1 βˆ’1 core/src/utils/input-shims/hacks/common.ts
  105. +1 βˆ’1 core/src/utils/input-shims/hacks/hide-caret.ts
  106. +1 βˆ’1 core/src/utils/input-shims/hacks/scroll-assist.ts
  107. +2 βˆ’2 core/src/utils/input-shims/hacks/scroll-data.ts
  108. +2 βˆ’2 core/src/utils/input-shims/input-shims.ts
  109. +0 βˆ’19 core/src/utils/lazy.ts
  110. +8 βˆ’8 core/src/utils/overlays.ts
  111. +1 βˆ’1 core/src/utils/theme.ts
  112. +12 βˆ’12 core/src/utils/transition.ts
@@ -5923,7 +5923,7 @@ declare global {
/**
* Scroll by a specified X/Y distance in the component
*/
'scrollByPoint': (x: number, y: number, duration: number, done?: Function | undefined) => Promise<any>;
'scrollByPoint': (x: number, y: number, duration: number) => Promise<any>;
/**
* If true, the component will emit scroll events.
*/
@@ -5935,7 +5935,7 @@ declare global {
/**
* Scroll to a specified X/Y location in the component
*/
'scrollToPoint': (x: number, y: number, duration: number, done?: Function | undefined) => Promise<any>;
'scrollToPoint': (x: number, y: number, duration: number) => Promise<void>;
/**
* Scroll to the top of the component
*/
@@ -98,22 +98,22 @@ export class ActionSheet implements OverlayInterface {
/**
* Emitted after the alert has presented.
*/
@Event({eventName: 'ionActionSheetDidPresent'}) didPresent!: EventEmitter<void>;
@Event({ eventName: 'ionActionSheetDidPresent' }) didPresent!: EventEmitter<void>;

/**
* Emitted before the alert has presented.
*/
@Event({eventName: 'ionActionSheetWillPresent'}) willPresent!: EventEmitter<void>;
@Event({ eventName: 'ionActionSheetWillPresent' }) willPresent!: EventEmitter<void>;

/**
* Emitted before the alert has dismissed.
*/
@Event({eventName: 'ionActionSheetWillDismiss'}) willDismiss!: EventEmitter<OverlayEventDetail>;
@Event({ eventName: 'ionActionSheetWillDismiss' }) willDismiss!: EventEmitter<OverlayEventDetail>;

/**
* Emitted after the alert has dismissed.
*/
@Event({eventName: 'ionActionSheetDidDismiss'}) didDismiss!: EventEmitter<OverlayEventDetail>;
@Event({ eventName: 'ionActionSheetDidDismiss' }) didDismiss!: EventEmitter<OverlayEventDetail>;


componentDidLoad() {
@@ -186,7 +186,7 @@ export class ActionSheet implements OverlayInterface {
}
}

private callButtonHandler(button: ActionSheetButton|undefined): boolean {
private callButtonHandler(button: ActionSheetButton | undefined): boolean {
if (button && button.handler) {
// a handler has been provided, execute it
// pass the handler the values from the inputs
@@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* iOS Action Sheet Enter Animation
*/
export function iosEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function iosEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.4);
@@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* iOS Action Sheet Leave Animation
*/
export function iosLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function iosLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.4, 0);
@@ -4,13 +4,13 @@ import { Animation } from '../../../interface';
/**
* MD Action Sheet Enter Animation
*/
export function mdEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.26);
@@ -3,14 +3,14 @@ import { Animation } from '../../../interface';
/**
* MD Action Sheet Leave Animation
*/
export function mdLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {

const baseAnimation = new Animation();
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.26, 0);
@@ -6,7 +6,7 @@ export interface AlertOptions {
cssClass?: string | string[];
mode?: string;
inputs?: AlertInput[];
buttons?: (AlertButton|string)[];
buttons?: (AlertButton | string)[];
enableBackdropDismiss?: boolean;
translucent?: boolean;
}
@@ -20,7 +20,7 @@ export interface AlertInput {
checked?: boolean;
disabled?: boolean;
id?: string;
handler?: Function;
handler?: (input: AlertInput) => void;
min?: string | number;
max?: string | number;
}
@@ -105,22 +105,22 @@ export class Alert implements OverlayInterface {
/**
* Emitted after the alert has presented.
*/
@Event({eventName: 'ionAlertDidPresent'}) didPresent!: EventEmitter<void>;
@Event({ eventName: 'ionAlertDidPresent' }) didPresent!: EventEmitter<void>;

/**
* Emitted before the alert has presented.
*/
@Event({eventName: 'ionAlertWillPresent'}) willPresent!: EventEmitter<void>;
@Event({ eventName: 'ionAlertWillPresent' }) willPresent!: EventEmitter<void>;

/**
* Emitted before the alert has dismissed.
*/
@Event({eventName: 'ionAlertWillDismiss'}) willDismiss!: EventEmitter<OverlayEventDetail>;
@Event({ eventName: 'ionAlertWillDismiss' }) willDismiss!: EventEmitter<OverlayEventDetail>;

/**
* Emitted after the alert has dismissed.
*/
@Event({eventName: 'ionAlertDidDismiss'}) didDismiss!: EventEmitter<OverlayEventDetail>;
@Event({ eventName: 'ionAlertDidDismiss' }) didDismiss!: EventEmitter<OverlayEventDetail>;

@Watch('buttons')
buttonsChanged() {
@@ -244,16 +244,16 @@ export class Alert implements OverlayInterface {
const role = button.role;
const values = this.getValues();
if (isCancel(role)) {
this.dismiss({values}, role);
this.dismiss({ values }, role);
return;
}
const returnData = this.callButtonHandler(button, values);
if (returnData !== false) {
this.dismiss({values, ...returnData}, button.role);
this.dismiss({ values, ...returnData }, button.role);
}
}

private callButtonHandler(button: AlertButton|undefined, data: any = undefined) {
private callButtonHandler(button: AlertButton | undefined, data?: any) {
if (button && button.handler) {
// a handler has been provided, execute it
// pass the handler the values from the inputs
@@ -427,7 +427,7 @@ export class Alert implements OverlayInterface {
const subHdrId = `alert-${this.overlayId}-sub-hdr`;
const msgId = `alert-${this.overlayId}-msg`;

let labelledById: string|undefined = undefined;
let labelledById: string | undefined;
if (this.header) {
labelledById = hdrId;
} else if (this.subHeader) {
@@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* iOS Alert Enter Animation
*/
export function iosEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function iosEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.3);
@@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* iOS Alert Leave Animation
*/
export function iosLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function iosLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.3, 0);
@@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* Md Alert Enter Animation
*/
export function mdEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.5);
@@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* Md Alert Leave Animation
*/
export function mdLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.5, 0);
@@ -5,9 +5,9 @@ export interface AnimationController {

export interface Animation {
new (): any;
parent: Animation|undefined;
parent: Animation | undefined;
hasChildren: boolean;
addElement(el: Node|Node[]|NodeList): Animation;
addElement(el: Node | Node[] | NodeList): Animation;
add(childAnimation: Animation): Animation;
duration(milliseconds: number): Animation;
easing(name: string): Animation;
@@ -21,8 +21,8 @@ export interface Animation {
beforeRemoveClass(className: string): Animation;
beforeStyles(styles: { [property: string]: any; }): Animation;
beforeClearStyles(propertyNames: string[]): Animation;
beforeAddRead(domReadFn: Function): Animation;
beforeAddWrite(domWriteFn: Function): Animation;
beforeAddRead(domReadFn: () => void): Animation;
beforeAddWrite(domWriteFn: () => void): Animation;
duringAddClass(className: string): Animation;
afterAddClass(className: string): Animation;
afterRemoveClass(className: string): Animation;
@@ -43,9 +43,7 @@ export interface Animation {
}


export interface AnimationBuilder {
(Animation: Animation, baseEl: HTMLElement, opts?: any): Promise<Animation>;
}
export type AnimationBuilder = (Animation: Animation, baseEl: HTMLElement, opts?: any) => Promise<Animation>;

export interface PlayOptions {
duration?: number;

0 comments on commit 92e21a8

Please sign in to comment.
You can’t perform that action at this time.