You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forgetting the type attribute on a button defaults it to being a submit type. This is nearly never what is intended, especially in your average one-page application.
type="button" stops the webpage from submitting the form, instead allowing the @click handler to work without the page reloading soon after.
type="submit" can be used explicitly to allow the default behaviour.
The text was updated successfully, but these errors were encountered:
SanterreJo
pushed a commit
to SanterreJo/eslint-plugin-vue
that referenced
this issue
Dec 7, 2019
Please describe what the rule should do:
All
<button>
tags require the type to be set.What category should the rule belong to?
Provide 2-3 code examples that this rule should warn about:
Additional context
Forgetting the
type
attribute on a button defaults it to being a submit type. This is nearly never what is intended, especially in your average one-page application.type="button"
stops the webpage from submitting the form, instead allowing the@click
handler to work without the page reloading soon after.type="submit"
can be used explicitly to allow the default behaviour.The text was updated successfully, but these errors were encountered: