mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-24 08:54:05 +10:00
Migrate from Biome to Oxlint/Oxfmt (#2822)
* Migrate from Biome to Oxlint/Oxfmt * pin version of autofix * set version of autofix * pin version of autofix * [autofix.ci] apply automated fixes * better comments, test formatter * [autofix.ci] apply automated fixes * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import * as React from "react";
|
||||
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogAction,
|
||||
|
||||
@@ -5,12 +5,10 @@ interface CommonControlledStateProps<T> {
|
||||
defaultValue?: T;
|
||||
}
|
||||
|
||||
// biome-ignore lint/suspicious/noExplicitAny: we don't care about the type of the rest of the arguments
|
||||
type UseControlledStateProps<T, Rest extends any[] = []> = CommonControlledStateProps<T> & {
|
||||
onChange?: (value: T, ...args: Rest) => void;
|
||||
};
|
||||
|
||||
// biome-ignore lint/suspicious/noExplicitAny: we don't care about the type of the rest of the arguments
|
||||
export function useControlledState<T, Rest extends any[] = []>(
|
||||
props: UseControlledStateProps<T, Rest>,
|
||||
): readonly [T, (next: T, ...args: Rest) => void] {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { t } from "@lingui/core/macro";
|
||||
import { useCallback } from "react";
|
||||
import type { FieldValues, UseFormReturn } from "react-hook-form";
|
||||
|
||||
import { t } from "@lingui/core/macro";
|
||||
import React, { useCallback } from "react";
|
||||
|
||||
import { useDialogStore } from "@/dialogs/store";
|
||||
import { useConfirm } from "@/hooks/use-confirm";
|
||||
|
||||
@@ -40,18 +42,19 @@ export function useFormBlocker<T extends FieldValues>(form: UseFormReturn<T>, op
|
||||
onEscapeKeyDown: (event: KeyboardEvent) => {
|
||||
if (shouldBlock()) {
|
||||
event.preventDefault();
|
||||
requestClose();
|
||||
void requestClose();
|
||||
}
|
||||
},
|
||||
onPointerDownOutside: (event: Event) => {
|
||||
if (shouldBlock()) {
|
||||
event.preventDefault();
|
||||
requestClose();
|
||||
void requestClose();
|
||||
}
|
||||
},
|
||||
onInteractOutside: (event: Event) => {
|
||||
if (shouldBlock()) {
|
||||
event.preventDefault();
|
||||
void requestClose();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { t } from "@lingui/core/macro";
|
||||
import * as React from "react";
|
||||
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogAction,
|
||||
|
||||
Reference in New Issue
Block a user