Skip to content

template-lint: Enable require-button-type rule #2041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ module.exports = {
'no-implicit-this': false,
'no-unnecessary-concat': false,
quotes: false,
'require-button-type': false,
},
};
20 changes: 13 additions & 7 deletions app/templates/components/api-token-row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,22 @@

<div class='actions'>
{{#if api_token.isNew}}
<button class='small yellow-button'
disabled={{disableCreate}}
title={{if emptyName "You must specify a name" ""}}
{{action "saveToken"}}>
<button
type="button"
class='small yellow-button'
disabled={{disableCreate}}
title={{if emptyName "You must specify a name" ""}}
{{action "saveToken"}}
>
Create
</button>
{{else}}
<button class='small tan-button'
disabled={{api_token.isSaving}}
{{action "revokeToken"}}>
<button
type="button"
class='small tan-button'
disabled={{api_token.isSaving}}
{{action "revokeToken"}}
>
Revoke
</button>
{{/if}}
Expand Down
8 changes: 5 additions & 3 deletions app/templates/components/email-input.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{/if}}
<div class='actions'>
<button type='submit' class='small yellow-button space-right' disabled={{disableSave}}>Save</button>
<button class='small yellow-button' {{action 'cancelEdit'}}>Cancel</button>
<button type="button" class='small yellow-button' {{action 'cancelEdit'}}>Cancel</button>
</div>
</form>
</div>
Expand All @@ -39,7 +39,7 @@
</dd>
</div>
<div class='actions'>
<button class='small yellow-button space-left' {{action 'editEmail'}}>Edit</button>
<button type="button" class='small yellow-button space-left' {{action 'editEmail'}}>Edit</button>
</div>
</div>
{{#if emailNotVerified }}
Expand All @@ -51,7 +51,9 @@
<p class='small-text'>Your email has not yet been verified.</p>
</div>
<div class='actions'>
<button class='small yellow-button space-left' {{action 'resendEmail'}} disabled={{disableResend}}>{{resendButtonText}}</button>
<button type="button" class='small yellow-button space-left' {{action 'resendEmail'}} disabled={{disableResend}}>
{{resendButtonText}}
</button>
</div>
</div>
{{/if}}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/components/pending-owner-invite-row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<span class='small'>{{moment-from-now invite.created_at}}</span>
</div>
<div class='actions'>
<button class='small yellow-button' {{action 'acceptInvitation' invite}}>Accept</button>
<button class='small yellow-button' {{action 'declineInvitation' invite}}>Decline</button>
<button type="button" class='small yellow-button' {{action 'acceptInvitation' invite}}>Accept</button>
<button type="button" class='small yellow-button' {{action 'declineInvitation' invite}}>Decline</button>
</div>
{{#if isError}}
<div class='label'>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/crate/owners.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
{{/if}}
</div>
<div class='stats downloads'>
<button class='remove-owner small yellow-button' {{action 'removeOwner' user}}>Remove</button>
<button type="button" class='remove-owner small yellow-button' {{action 'removeOwner' user}}>Remove</button>
</div>
</div>
{{/each}}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/crate/version.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<div class='right'>
{{#if session.currentUser}}
<button class='tan-button' {{action 'toggleFollow' this}}>
<button type="button" class='tan-button' {{action 'toggleFollow' this}}>
{{#if fetchingFollowing}}
<img src="/assets/ajax-loader.gif">
{{else}}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/dashboard.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</span>
{{else}}
{{#if hasMore}}
<button class='load-more' {{ action 'loadMore' }}>
<button type="button" class='load-more' {{ action 'loadMore' }}>
Load More
</button>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/me/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<div class='me-subheading'>
<h2>API Access</h2>
<div class='right'>
<button class='yellow-button' disabled={{disableCreate}} {{action "startNewToken"}}>New Token</button>
<button type="button" class='yellow-button' disabled={{disableCreate}} {{action "startNewToken"}}>New Token</button>
</div>
</div>

Expand Down