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 58743 additions and 54958 deletions

View File

@ -1,15 +1,15 @@
import { Build, Component, ComponentInterface, Element, Host, Method, Prop, Watch, h } from '@stencil/core';
import type { ComponentInterface } from '@stencil/core';
import { Build, Component, Element, Host, Method, Prop, Watch, h } from '@stencil/core';
import { ComponentRef, FrameworkDelegate } from '../../interface';
import type { ComponentRef, FrameworkDelegate } from '../../interface';
import { attachComponent } from '../../utils/framework-delegate';
@Component({
tag: 'ion-tab',
styleUrl: 'tab.scss',
shadow: true
shadow: true,
})
export class Tab implements ComponentInterface {
private loaded = false;
@Element() el!: HTMLIonTabElement;
@ -33,10 +33,12 @@ export class Tab implements ComponentInterface {
async componentWillLoad() {
if (Build.isDev) {
if (this.component !== undefined && this.el.childElementCount > 0) {
console.error('You can not use a lazy-loaded component in a tab and inlined content at the same time.' +
`- Remove the component attribute in: <ion-tab component="${this.component}">` +
` or` +
`- Remove the embedded content inside the ion-tab: <ion-tab></ion-tab>`);
console.error(
'You can not use a lazy-loaded component in a tab and inlined content at the same time.' +
`- Remove the component attribute in: <ion-tab component="${this.component}">` +
` or` +
`- Remove the embedded content inside the ion-tab: <ion-tab></ion-tab>`
);
}
}
if (this.active) {
@ -79,7 +81,7 @@ export class Tab implements ComponentInterface {
aria-labelledby={`tab-button-${tab}`}
class={{
'ion-page': component === undefined,
'tab-hidden': !active
'tab-hidden': !active,
}}
>
<slot></slot>