Skip to content

Commit 2276bbe

Browse files
committed
feat(vue): enable html-button-has-type as error
Errors when button elements are missing a type attribute, preventing accidental form submissions. No autofix.
1 parent 33dbb6e commit 2276bbe

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/configs/vue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export async function vue(
4848
multiline: 'below',
4949
singleline: 'ignore',
5050
}],
51+
'vue/html-button-has-type': 'error',
5152
'vue/html-self-closing': [
5253
'error',
5354
{

test/__snapshots__/factory/full-on.snap.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,7 @@
13431343
"singleline": "ignore"
13441344
}
13451345
],
1346+
"vue/html-button-has-type": "error",
13461347
"vue/html-closing-bracket-newline": "warn",
13471348
"vue/html-closing-bracket-spacing": "warn",
13481349
"vue/html-comment-content-spacing": [

test/__snapshots__/factory/javascript-vue.snap.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,7 @@
11231123
"singleline": "ignore"
11241124
}
11251125
],
1126+
"vue/html-button-has-type": "error",
11261127
"vue/html-closing-bracket-newline": "warn",
11271128
"vue/html-closing-bracket-spacing": "warn",
11281129
"vue/html-comment-content-spacing": [

0 commit comments

Comments
 (0)