Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve 15 of 16 remaining lint warnings #2662

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export const CreateKey: React.FC<Props> = ({ apiId, keyAuthId, defaultBytes, def
form.resetField("limit", undefined);
};

// biome-ignore lint: only run once
// biome-ignore lint/correctness/useExhaustiveDependencies: reset is only required on mount
useEffect(() => {
// React hook form + zod doesn't play nice with nested objects, so we need to reset them on load.
resetRateLimit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const Client: React.FC<Props> = ({ apis }) => {
}));
};

// biome-ignore lint: should only run once
// biome-ignore lint/correctness/useExhaustiveDependencies: effect must be called once to set initial cards state
useEffect(() => {
const initialSelectedApiSet = new Set<string>();
selectedPermissions.forEach((permission) => {
Expand Down
5 changes: 3 additions & 2 deletions apps/dashboard/app/auth/sign-in/email-signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ export function EmailSignIn(props: {
const router = useRouter();
const [lastUsed, setLastUsed] = useLastUsed();

// biome-ignore lint: this works
// biome-ignore lint/correctness/useExhaustiveDependencies: effect must be called once if sign-in is loaded
chronark marked this conversation as resolved.
Show resolved Hide resolved
React.useEffect(() => {
const signUpOrgUser = async () => {
const ticket = new URL(window.location.href).searchParams.get(param);
if (!signInLoaded) {
return;
}

const ticket = new URL(window.location.href).searchParams.get(param);
if (!ticket) {
return;
}
Expand Down
8 changes: 7 additions & 1 deletion apps/dashboard/app/auth/sign-up/email-signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ export const EmailSignUp: React.FC<Props> = ({ setError, setVerification }) => {
const [isLoading, setIsLoading] = React.useState(false);
const [_transferLoading, setTransferLoading] = React.useState(true);
const router = useRouter();
// biome-ignore lint: works fine as is

// biome-ignore lint/correctness/useExhaustiveDependencies: effect must be called once if sign-up is loaded
React.useEffect(() => {
const signUpFromParams = async () => {
if (!signUpLoaded) {
return;
}

const ticket = new URL(window.location.href).searchParams.get("__clerk_ticket");
const emailParam = new URL(window.location.href).searchParams.get("email");
if (!ticket && !emailParam) {
Expand Down Expand Up @@ -69,6 +74,7 @@ export const EmailSignUp: React.FC<Props> = ({ setError, setVerification }) => {
});
}
};

signUpFromParams();
setTransferLoading(false);
}, [signUpLoaded]);
Expand Down
2 changes: 1 addition & 1 deletion apps/www/components/shiny-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const ShinyCardGroup: React.FC<ShinyCardGroupProps> = ({
});
}
}
}, [mousePosition.x, mousePosition.y]);
}, [boxes, mousePosition.x, mousePosition.y]);

useEffect(() => {
onMouseMove();
Expand Down
Loading