Skip to content

Commit

Permalink
Enable noUnusedImports and noUnusedVariables in Biome
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Aug 31, 2024
1 parent 95817fe commit 787ffe4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"complexity": {
"noUselessSwitchCase": "off"
},
"correctness": {
"noUnusedImports": "warn",
"noUnusedVariables": "warn"
},
"suspicious": {
"noConsoleLog": "warn"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-time-picker/src/TimeInput.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const hasFullICU = (() => {
const date = new Date(2018, 0, 1, 21);
const formatter = new Intl.DateTimeFormat('de-DE', { hour: 'numeric' });
return formatter.format(date).includes('21');
} catch (err) {
} catch {
return false;
}
})();
Expand Down
2 changes: 1 addition & 1 deletion packages/react-time-picker/src/TimeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ export default function TimeInput({
);
}

function renderAmPm(currentMatch: string, index: number) {
function renderAmPm(_currentMatch: string, index: number) {
return (
<AmPm
key="ampm"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-time-picker/src/TimePicker.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function waitForElementToBeRemovedOrHidden(callback: () => HTMLElement | n
await waitFor(() =>
expect(element).toHaveAttribute('class', expect.stringContaining('--closed')),
);
} catch (error) {
} catch {
await waitForElementToBeRemoved(element);
}
}
Expand Down

0 comments on commit 787ffe4

Please sign in to comment.