Skip to content

Commit 181cdba

Browse files
committed
Auto merge of #2041 - Turbo87:button, r=locks
template-lint: Enable `require-button-type` rule see https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/require-button-type.md r? @locks @NullVoxPopuli
2 parents 6a3af34 + 03a7905 commit 181cdba

File tree

8 files changed

+24
-17
lines changed

8 files changed

+24
-17
lines changed

.template-lintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ module.exports = {
1313
'no-implicit-this': false,
1414
'no-unnecessary-concat': false,
1515
quotes: false,
16-
'require-button-type': false,
1716
},
1817
};

app/templates/components/api-token-row.hbs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,22 @@
3939

4040
<div class='actions'>
4141
{{#if api_token.isNew}}
42-
<button class='small yellow-button'
43-
disabled={{disableCreate}}
44-
title={{if emptyName "You must specify a name" ""}}
45-
{{action "saveToken"}}>
42+
<button
43+
type="button"
44+
class='small yellow-button'
45+
disabled={{disableCreate}}
46+
title={{if emptyName "You must specify a name" ""}}
47+
{{action "saveToken"}}
48+
>
4649
Create
4750
</button>
4851
{{else}}
49-
<button class='small tan-button'
50-
disabled={{api_token.isSaving}}
51-
{{action "revokeToken"}}>
52+
<button
53+
type="button"
54+
class='small tan-button'
55+
disabled={{api_token.isSaving}}
56+
{{action "revokeToken"}}
57+
>
5258
Revoke
5359
</button>
5460
{{/if}}

app/templates/components/email-input.hbs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{{/if}}
2222
<div class='actions'>
2323
<button type='submit' class='small yellow-button space-right' disabled={{disableSave}}>Save</button>
24-
<button class='small yellow-button' {{action 'cancelEdit'}}>Cancel</button>
24+
<button type="button" class='small yellow-button' {{action 'cancelEdit'}}>Cancel</button>
2525
</div>
2626
</form>
2727
</div>
@@ -39,7 +39,7 @@
3939
</dd>
4040
</div>
4141
<div class='actions'>
42-
<button class='small yellow-button space-left' {{action 'editEmail'}}>Edit</button>
42+
<button type="button" class='small yellow-button space-left' {{action 'editEmail'}}>Edit</button>
4343
</div>
4444
</div>
4545
{{#if emailNotVerified }}
@@ -51,7 +51,9 @@
5151
<p class='small-text'>Your email has not yet been verified.</p>
5252
</div>
5353
<div class='actions'>
54-
<button class='small yellow-button space-left' {{action 'resendEmail'}} disabled={{disableResend}}>{{resendButtonText}}</button>
54+
<button type="button" class='small yellow-button space-left' {{action 'resendEmail'}} disabled={{disableResend}}>
55+
{{resendButtonText}}
56+
</button>
5557
</div>
5658
</div>
5759
{{/if}}

app/templates/components/pending-owner-invite-row.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
<span class='small'>{{moment-from-now invite.created_at}}</span>
3131
</div>
3232
<div class='actions'>
33-
<button class='small yellow-button' {{action 'acceptInvitation' invite}}>Accept</button>
34-
<button class='small yellow-button' {{action 'declineInvitation' invite}}>Decline</button>
33+
<button type="button" class='small yellow-button' {{action 'acceptInvitation' invite}}>Accept</button>
34+
<button type="button" class='small yellow-button' {{action 'declineInvitation' invite}}>Decline</button>
3535
</div>
3636
{{#if isError}}
3737
<div class='label'>

app/templates/crate/owners.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
{{/if}}
6565
</div>
6666
<div class='stats downloads'>
67-
<button class='remove-owner small yellow-button' {{action 'removeOwner' user}}>Remove</button>
67+
<button type="button" class='remove-owner small yellow-button' {{action 'removeOwner' user}}>Remove</button>
6868
</div>
6969
</div>
7070
{{/each}}

app/templates/crate/version.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<div class='right'>
1212
{{#if session.currentUser}}
13-
<button class='tan-button' {{action 'toggleFollow' this}}>
13+
<button type="button" class='tan-button' {{action 'toggleFollow' this}}>
1414
{{#if fetchingFollowing}}
1515
<img src="/assets/ajax-loader.gif">
1616
{{else}}

app/templates/dashboard.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
</span>
7575
{{else}}
7676
{{#if hasMore}}
77-
<button class='load-more' {{ action 'loadMore' }}>
77+
<button type="button" class='load-more' {{ action 'loadMore' }}>
7878
Load More
7979
</button>
8080
{{/if}}

app/templates/me/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<div class='me-subheading'>
7373
<h2>API Access</h2>
7474
<div class='right'>
75-
<button class='yellow-button' disabled={{disableCreate}} {{action "startNewToken"}}>New Token</button>
75+
<button type="button" class='yellow-button' disabled={{disableCreate}} {{action "startNewToken"}}>New Token</button>
7676
</div>
7777
</div>
7878

0 commit comments

Comments
 (0)