#12049·biome

`useButtonType` has a lot of false positive outside forms

Author: lgarronCreated Sep 30, 2026Updated Sep 30, 2026
LabelsA-LinterL-JavaScriptS-Needs discussionL-HTMLS-Needs triage

Environment information

biome 2.5.15

Rule name

useButtonType

Playground link

https://biomejs.dev/playground/?language=html#code=PABiAHUAdAB0AG8AbgAgAGkAZAA9ACIAZgBvAG8AIgA%2BAEMAbwBwAHkAIAB0AGUAeAB0ADwALwBiAHUAdAB0AG8AbgA%2BAAoAPABzAGMAcgBpAHAAdAA%2BAAoAIAAgAGQAbwBjAHUAbQBlAG4AdAAuAHEAdQBlAHIAeQBTAGUAbABlAGMAdABvAHIAKAAiACMAZgBvAG8AIgApAC4AYQBkAGQARQB2AGUAbgB0AEwAaQBzAHQAZQBuAGUAcgAoACIAYwBsAGkAYwBrACIALAAgACgAKQAgAD0APgAgAG4AYQB2AGkAZwBhAHQAbwByAC4AYwBsAGkAcABiAG8AYQByAGQALgB3AHIAaQB0AGUAVABlAHgAdAAoACIAdABlAHgAdAAiACkAKQA7AAoAPAAvAHMAYwByAGkAcAB0AD4ACgA%3D

Expected result

useButtonType doesn't warn outside of forms, where the type="submit" is not an issue.

Whenever I update a project to a recent version of Biome my <buton> elements all develop errors. They are rarely inside forms, so adding type="button" would do nothing for the correctness of the app and just make the page larger for no benefit. I can't think of a single time this issue has helped me avoid a real bug.

I think the only real issue is that such buttons can develop issues if they are associated with forms at a later point. But at that point Biome can error.

I'd like to propose that the rule defaults to only warning for buttons that:

Code of Conduct

  • I agree to follow Biome's Code of Conduct