Inspections: warn when button hasn't type attribute
Hi,
Is there any way to add in code style a rule for force to add the type attribute to button elements?
Sometimes I forget to add type="button", and if it's in a form, the form is submitted.
请先登录再写评论。
Hi there,
SSR based inspections? (sorry, no fully working examples from me)
Other than that -- maybe some existing linters (that IDE supports) support custom rules?..
Some semi working example (will show warnings if <button> does not have "role" attribute).
....
The rest you will have to try yourself.