Skip to content

Commit 787ffe4

Browse files
committed
Enable noUnusedImports and noUnusedVariables in Biome
1 parent 95817fe commit 787ffe4

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
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-time-picker/src/TimeInput.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-time-picker/src/TimeInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ export default function TimeInput({
541541
);
542542
}
543543

544-
function renderAmPm(currentMatch: string, index: number) {
544+
function renderAmPm(_currentMatch: string, index: number) {
545545
return (
546546
<AmPm
547547
key="ampm"

packages/react-time-picker/src/TimePicker.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)