Skip to content

Commit

Permalink
chore: missng fix from remove import
Browse files Browse the repository at this point in the history
  • Loading branch information
eMerzh committed Feb 11, 2024
1 parent d5d6463 commit 15a4d96
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 16 deletions.
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
},
"correctness": {
"noEmptyPattern": "off",
"useExhaustiveDependencies": "off"
"useExhaustiveDependencies": "off",
"noUnusedVariables": "error"
},
"performance": {
"noAccumulatingSpread": "warn"
Expand Down
2 changes: 0 additions & 2 deletions src/components/custom/Stat/Stat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ export default function Stat({
value,
icon: Icon,
color,
width,
}: {
value: number | string;
icon: React.FC<TablerIconsProps>;
name: string;
color: string;
width?: string;
}) {
const scheme = useComputedColorScheme("light");

Expand Down
4 changes: 2 additions & 2 deletions src/components/editcard/CardEditor/ClozeCardEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function finish(
);
}
successfullySaved();
} catch (error) {
} catch {
saveFailed();
}
} else {
Expand All @@ -168,7 +168,7 @@ function finish(
}).then((cards) => newCards(cards, deck));
clear();
successfullyAdded();
} catch (error) {
} catch {
addFailed();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/editcard/CardEditor/DoubleSidedCardEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function finish(
);
}
successfullySaved();
} catch (error) {
} catch {
saveFailed();
}
} else {
Expand All @@ -59,7 +59,7 @@ async function finish(
}).then((cards) => newCards(cards, deck));
clear && clear();
successfullyAdded();
} catch (error) {
} catch {
addFailed();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/editcard/CardEditor/NormalCardEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function finishCard(
return;
}
successfullySaved();
} catch (error) {
} catch {
saveFailed();
}
} else {
Expand All @@ -52,7 +52,7 @@ async function finishCard(
await newCard(cardInstance, deck);
clear && clear();
successfullyAdded();
} catch (error) {
} catch {
addFailed();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/editcard/CardMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function CardMenu({ card, onDelete }: CardMenuProps) {
)}

<DangerousConfirmModal
dangerousAction={(card: Card<CardType>) => tryDeleteCard()}
dangerousAction={() => tryDeleteCard()}
dangerousDependencies={[card]}
dangerousTitle={"Delete Card"}
dangerousDescription={
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/ColorSchemeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SettingsValues, setSetting, useSetting } from "../../logic/Settings";

export default function SegmentedToggle() {
const [colorSchemePreference] = useSetting("colorSchemePreference");
const { colorScheme, setColorScheme } = useMantineColorScheme();
const { setColorScheme } = useMantineColorScheme();

return (
<Input.Wrapper
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/importexport/ImportButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function ImportButton({
setImportStatus("importing");
try {
await importFunction();
} catch (e) {
} catch {
setImportStatus("error");
return;
} finally {
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/importexport/ImportFromJSON.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function ImportFromJSON({
let ed: ExtractedData | null = null;
try {
ed = await parseFile(fileText);
} catch (e) {
} catch {
setImportStatus("error");
return;
} finally {
Expand Down
2 changes: 1 addition & 1 deletion src/logic/CardTypeImplementations/UndefinedCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Card, CardType, createCardSkeleton } from "../card";
import React from "react";

export const UndefinedCardUtils: CardTypeManager<CardType.Undefined> = {
update(params: {}, existingCard: Card<CardType.Undefined>) {
update(_, existingCard: Card<CardType.Undefined>) {
return {
...existingCard,
content: {
Expand Down
4 changes: 2 additions & 2 deletions src/logic/deck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async function determineSubDecks(
} else {
return [undefined, true];
}
} catch (error) {
} catch {
return [undefined, true];
}
}
Expand Down Expand Up @@ -152,7 +152,7 @@ async function determineSuperDecks(
} else {
return [undefined, true];
}
} catch (error) {
} catch {
return [undefined, true];
}
}
Expand Down

0 comments on commit 15a4d96

Please sign in to comment.