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,8 +1,9 @@
import { Component, ComponentInterface, Element, Host, Prop, h } from '@stencil/core';
import type { ComponentInterface } from '@stencil/core';
import { Component, Element, Host, Prop, h } from '@stencil/core';
import { getIonMode } from '../../global/ionic-global';
import { Color } from '../../interface';
import { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
import type { Color } from '../../interface';
import type { AnchorInterface, ButtonInterface } from '../../utils/element-interface';
import { createColorClasses } from '../../utils/theme';
/**
@ -21,12 +22,11 @@ import { createColorClasses } from '../../utils/theme';
tag: 'ion-item-option',
styleUrls: {
ios: 'item-option.ios.scss',
md: 'item-option.md.scss'
md: 'item-option.md.scss',
},
shadow: true
shadow: true,
})
export class ItemOption implements ComponentInterface, AnchorInterface, ButtonInterface {
@Element() el!: HTMLElement;
/**
@ -83,19 +83,20 @@ export class ItemOption implements ComponentInterface, AnchorInterface, ButtonIn
if (el) {
ev.preventDefault();
}
}
};
render() {
const { disabled, expandable, href } = this;
const TagType = href === undefined ? 'button' : 'a' as any;
const TagType = href === undefined ? 'button' : ('a' as any);
const mode = getIonMode(this);
const attrs = (TagType === 'button')
? { type: this.type }
: {
download: this.download,
href: this.href,
target: this.target
};
const attrs =
TagType === 'button'
? { type: this.type }
: {
download: this.download,
href: this.href,
target: this.target,
};
return (
<Host
@ -104,15 +105,10 @@ export class ItemOption implements ComponentInterface, AnchorInterface, ButtonIn
[mode]: true,
'item-option-disabled': disabled,
'item-option-expandable': expandable,
'ion-activatable': true
'ion-activatable': true,
})}
>
<TagType
{...attrs}
class="button-native"
part="native"
disabled={disabled}
>
<TagType {...attrs} class="button-native" part="native" disabled={disabled}>
<span class="button-inner">
<slot name="top"></slot>
<div class="horizontal-wrapper">