-
-
Notifications
You must be signed in to change notification settings - Fork 931
Closed
Labels
A-linterArea - LinterArea - LinterC-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Description
This line triggers a no-unused-vars warning when it should not: https://github.com/votingworks/vxsuite/blob/720f72ac404bfff011034f275317a02f5d69cff9/libs/ui/src/hand_marked_paper_ballot_prose.tsx#L10:
Here's a stripped down–but not minimal–version of the code that still reproduces the issue:
import styled from 'styled-components';
import { Prose, ProseProps } from './prose';
interface Props extends ProseProps {
density?: number;
}
export const HandMarkedPaperBallotProse = styled(Prose)<Props>`
line-height: ${({ density }) => (density !== 0 ? '1.1' : '1.3')};
`;Here's the output from oxlint:
❯ npx oxlint@latest libs/ui/src/hand_marked_paper_ballot_prose_minimal.tsx
⚠ eslint(no-unused-vars): Parameter 'density' is declared but never used.
╭─[libs/ui/src/hand_marked_paper_ballot_prose_minimal.tsx:10:21]
9 │ export const HandMarkedPaperBallotProse = styled(Prose)<Props>`
10 │ line-height: ${({ density }) => (density !== 0 ? '1.1' : '1.3')};
· ───┬───
· ╰── 'density' is declared here
11 │ `;
╰────
help: Consider removing this parameter.
Finished in 4ms on 1 file with 93 rules using 3 threads.
Found 1 warning and 0 errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - LinterC-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Type
Fields
Give feedbackPriority
None yet