Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 noDuplicateJsxProps should be case-sensitive #95

Closed
1 task done
maccuaa opened this issue Aug 30, 2023 · 2 comments · Fixed by #100
Closed
1 task done

🐛 noDuplicateJsxProps should be case-sensitive #95

maccuaa opened this issue Aug 30, 2023 · 2 comments · Fixed by #100
Assignees
Labels
S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@maccuaa
Copy link

maccuaa commented Aug 30, 2023

Environment information

N/A

What happened?

The current implementation of the noDuplicateJsxProps rule is case-sensitive but JSX handles props in a case-insensitive manner so 2 props with the same name but different cases are treated separately and are valid.

A good example of this is the MUI TextField component which has inputProps and InputProps props which when used cause the Biome lint command to fail.

Note that this bug isn't about the semantics of whether or not using 2 props with the same name is good practice or not (IMO it's bad practice).

Expected result

The noDuplicateJsxProps rule should be case-sensitive.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added the S-Bug-confirmed Status: report has been confirmed as a valid bug label Aug 30, 2023
@Conaclos Conaclos added this to the Biome 1.1.0 milestone Aug 30, 2023
@Conaclos Conaclos self-assigned this Aug 31, 2023
@maccuaa
Copy link
Author

maccuaa commented Aug 31, 2023

thanks for the quick turnaround! 👏

@oliviertassinari
Copy link

oliviertassinari commented May 26, 2024

Note that this bug isn't about the semantics of whether or not using 2 props with the same name is good practice or not (IMO it's bad practice).

We mostly fixed it mui/material-ui#11377 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants