lint(eslint): migrate to eslint and prettier (#25046)

This commit is contained in:
Liam DeBeasi
2022-04-04 11:12:53 -04:00
committed by GitHub
parent 12fd19dd4d
commit 5676bab316
826 changed files with 56539 additions and 52754 deletions

View File

@ -1,9 +1,10 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Prop, h } from '@stencil/core';
import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Element, Event, Host, Prop, h } from '@stencil/core';
import { close } from 'ionicons/icons';
import { getIonMode } from '../../global/ionic-global';
import { AnimationBuilder, Color, RouterDirection } from '../../interface';
import { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
import type { AnimationBuilder, Color, RouterDirection } from '../../interface';
import type { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
import { createColorClasses, hostContext, openURL } from '../../utils/theme';
/**
@ -16,9 +17,9 @@ import { createColorClasses, hostContext, openURL } from '../../utils/theme';
tag: 'ion-fab-button',
styleUrls: {
ios: 'fab-button.ios.scss',
md: 'fab-button.md.scss'
md: 'fab-button.md.scss',
},
shadow: true
shadow: true,
})
export class FabButton implements ComponentInterface, AnchorInterface, ButtonInterface {
@Element() el!: HTMLElement;
@ -120,25 +121,26 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
private onFocus = () => {
this.ionFocus.emit();
}
};
private onBlur = () => {
this.ionBlur.emit();
}
};
render() {
const { el, disabled, color, href, activated, show, translucent, size } = this;
const inList = hostContext('ion-fab-list', el);
const mode = getIonMode(this);
const TagType = href === undefined ? 'button' : 'a' as any;
const attrs = (TagType === 'button')
? { type: this.type }
: {
download: this.download,
href,
rel: this.rel,
target: this.target
};
const TagType = href === undefined ? 'button' : ('a' as any);
const attrs =
TagType === 'button'
? { type: this.type }
: {
download: this.download,
href,
rel: this.rel,
target: this.target,
};
return (
<Host
@ -156,7 +158,6 @@ export class FabButton implements ComponentInterface, AnchorInterface, ButtonInt
[`fab-button-${size}`]: size !== undefined,
})}
>
<TagType
{...attrs}
class="button-native"