Skip to content

Commit 2c7edbe

Browse files
committed
Enable noUnusedImports and noUnusedVariables in Biome
1 parent 56ac0bc commit 2c7edbe

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

biome.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
"complexity": {
1313
"noUselessSwitchCase": "off"
1414
},
15+
"correctness": {
16+
"noUnusedImports": "warn",
17+
"noUnusedVariables": "warn"
18+
},
1519
"suspicious": {
1620
"noConsoleLog": "warn"
1721
}

packages/react-datetime-picker/src/DateTimeInput.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const hasFullICU = (() => {
1313
const date = new Date(2018, 0, 1, 21);
1414
const formatter = new Intl.DateTimeFormat('de-DE', { hour: 'numeric' });
1515
return formatter.format(date).includes('21');
16-
} catch (err) {
16+
} catch {
1717
return false;
1818
}
1919
})();

packages/react-datetime-picker/src/DateTimeInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ export default function DateTimeInput({
698698
);
699699
}
700700

701-
function renderYear(currentMatch: string, index: number) {
701+
function renderYear(_currentMatch: string, index: number) {
702702
return (
703703
<YearInput
704704
key="year"
@@ -813,7 +813,7 @@ export default function DateTimeInput({
813813
);
814814
}
815815

816-
function renderAmPm(currentMatch: string, index: number) {
816+
function renderAmPm(_currentMatch: string, index: number) {
817817
return (
818818
<AmPm
819819
key="ampm"

packages/react-datetime-picker/src/DateTimePicker.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ async function waitForElementToBeRemovedOrHidden(callback: () => HTMLElement | n
1212
await waitFor(() =>
1313
expect(element).toHaveAttribute('class', expect.stringContaining('--closed')),
1414
);
15-
} catch (error) {
15+
} catch {
1616
await waitForElementToBeRemoved(element);
1717
}
1818
}

0 commit comments

Comments
 (0)