chore(react): migrate to eslint, add prettier (#26633)

This commit is contained in:
Liam DeBeasi
2023-01-18 16:49:25 -05:00
committed by GitHub
parent 2dca54a457
commit b02190d71f
70 changed files with 4508 additions and 1002 deletions

View File

@@ -1,10 +1,11 @@
import { PopoverOptions, popoverController } from '@ionic/core/components';
import type { PopoverOptions } from '@ionic/core/components';
import { popoverController } from '@ionic/core/components';
import { defineCustomElement } from '@ionic/core/components/ion-popover.js';
import { useCallback } from 'react';
import { ReactComponentOrElement } from '../models/ReactComponentOrElement';
import type { ReactComponentOrElement } from '../models/ReactComponentOrElement';
import { HookOverlayOptions } from './HookOverlayOptions';
import type { HookOverlayOptions } from './HookOverlayOptions';
import { useOverlay } from './useOverlay';
// TODO(FW-2959): types
@@ -24,14 +25,14 @@ export function useIonPopover(component: ReactComponentOrElement, componentProps
componentProps
);
const present = useCallback((options: Omit<PopoverOptions, 'component' | 'componentProps'> & HookOverlayOptions = {}) => {
controller.present(options as any);
}, [controller.present]);
const present = useCallback(
(options: Omit<PopoverOptions, 'component' | 'componentProps'> & HookOverlayOptions = {}) => {
controller.present(options as any);
},
[controller.present]
);
return [
present,
controller.dismiss
];
return [present, controller.dismiss];
}
export type UseIonPopoverResult = [