chore(vue): add eslint and prettier (#26635)

This commit is contained in:
Liam DeBeasi
2023-01-18 18:29:25 -05:00
committed by GitHub
parent 6d4c52aa5b
commit dc27736bd5
25 changed files with 5693 additions and 574 deletions

View File

@ -1,33 +1,38 @@
import { h, inject, defineComponent } from 'vue';
import { defineCustomElement } from '@ionic/core/components/ion-back-button.js';
import { defineCustomElement } from "@ionic/core/components/ion-back-button.js";
import { h, inject, defineComponent } from "vue";
export const IonBackButton = /*@__PURE__*/ defineComponent((_, { attrs, slots }) => {
defineCustomElement();
export const IonBackButton = /*@__PURE__*/ defineComponent(
(_, { attrs, slots }) => {
defineCustomElement();
// TODO(FW-2969): type
const ionRouter: any = inject('navManager');
// TODO(FW-2969): type
const ionRouter: any = inject("navManager");
const onClick = () => {
/**
* When using ion-back-button outside of
* a routing context, ionRouter is undefined.
*/
if (ionRouter === undefined) { return; }
const onClick = () => {
/**
* When using ion-back-button outside of
* a routing context, ionRouter is undefined.
*/
if (ionRouter === undefined) {
return;
}
const defaultHref = attrs['default-href'] || attrs['defaultHref'];
const routerAnimation = attrs['router-animation'] || attrs['routerAnimation'];
const defaultHref = attrs["default-href"] || attrs["defaultHref"];
const routerAnimation =
attrs["router-animation"] || attrs["routerAnimation"];
ionRouter.handleNavigateBack(defaultHref, routerAnimation);
ionRouter.handleNavigateBack(defaultHref, routerAnimation);
};
return () => {
return h(
"ion-back-button",
{
onClick,
...attrs,
},
slots.default && slots.default()
);
};
}
return () => {
return h(
'ion-back-button',
{
onClick,
...attrs
},
slots.default && slots.default()
)
}
});
);