DEV: Fix and enable the 'require-button-type' lint

This commit is contained in:
Kane York 2020-04-13 15:22:35 -07:00 committed by Kane York
parent 5a5685766a
commit c670a34013
9 changed files with 12 additions and 12 deletions

View File

@ -43,8 +43,8 @@ module.exports = {
"no-unnecessary-concat": true,
"no-unnecessary-component-helper": true,
"no-unused-block-params": true,
quotes: "double",
"require-button-type": false,
"quotes": "double",
"require-button-type": true,
"require-iframe-title": true,
"require-valid-alt-text": false,
"self-closing-void-elements": true,

View File

@ -15,7 +15,7 @@
{{#each model.errors as |error|}}
<div class="alert alert-error">
<button class="close" data-dismiss="alert">×</button>
<button type="button" class="close" data-dismiss="alert" aria-label={{i18n "modal.dismiss_error"}}>×</button>
{{error}}
</div>
{{/each}}

View File

@ -33,7 +33,7 @@
{{#each errors as |error|}}
<div class="alert alert-error">
<button class="close" data-dismiss="alert" aria-label={{i18n "modal.dismiss_error"}}>×</button>
<button type="button" class="close" data-dismiss="alert" aria-label={{i18n "modal.dismiss_error"}}>×</button>
{{error}}
</div>
{{/each}}

View File

@ -2,6 +2,6 @@
<form action="//google.com/search" id="google-search">
<input type="text" name="q" value={{searchTerm}}>
<input name="as_sitesearch" value={{siteUrl}} type="hidden">
<button class="btn btn-primary">{{i18n "search.search_google_button"}}</button>
<button class="btn btn-primary" type="submit">{{i18n "search.search_google_button"}}</button>
</form>
</div>

View File

@ -1,5 +1,5 @@
{{#each buttons as |b|}}
<button class="btn btn-social {{b.name}}" {{action externalLogin b}}>
<button type="button" class="btn btn-social {{b.name}}" {{action externalLogin b}}>
{{#if b.isGoogle}}
<svg class="fa d-icon d-icon-custom-google-oauth2 svg-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48"><defs><path id="a" d="M44.5 20H24v8.5h11.8C34.7 33.9 30.1 37 24 37c-7.2 0-13-5.8-13-13s5.8-13 13-13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 11.8 2 2 11.8 2 24s9.8 22 22 22c11 0 21-8 21-22 0-1.3-.2-2.7-.5-4z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path clip-path="url(#b)" fill="#FBBC05" d="M0 37V11l17 13z"/><path clip-path="url(#b)" fill="#EA4335" d="M0 11l17 13 7-6.1L48 14V0H0z"/><path clip-path="url(#b)" fill="#34A853" d="M0 37l30-23 7.9 1L48 0v48H0z"/><path clip-path="url(#b)" fill="#4285F4" d="M48 48L17 24l-4-3 35-10z"/></svg>
{{else if b.icon}}

View File

@ -4,7 +4,7 @@
{{clockIcon}} {{notice}}
</span>
{{#if showTrashCan}}
<button class="btn topic-timer-remove no-text" title={{trashCanTitle}}>
<button type="button" class="btn topic-timer-remove no-text" title={{trashCanTitle}}>
{{trashCanIcon}}
</button>
{{/if}}

View File

@ -1,6 +1,6 @@
<span class="email">{{user.email}}</span>
<span class="role">{{roleName}}</span>
<button class="wizard-btn small danger remove-user" {{action removeUser user}}>
<button type="button" class="wizard-btn small danger remove-user" {{action removeUser user}}>
{{d-icon "times"}}
</button>

View File

@ -19,7 +19,7 @@
onChange=(action (mut inviteRole))
}}
<button class="wizard-btn small add-user" {{action "addUser"}}>
<button type="button" class="wizard-btn small add-user" {{action "addUser"}}>
{{d-icon "plus"}}{{i18n "wizard.invites.add_user"}}
</button>
</div>

View File

@ -35,7 +35,7 @@
{{/if}}
{{#if showFinishButton}}
<button {{action "exitEarly"}} disabled={{saving}} tabindex="10" class="wizard-btn finish">
<button {{action "exitEarly"}} disabled={{saving}} tabindex="10" type="button" class="wizard-btn finish">
{{i18n "wizard.finish"}}
</button>
{{/if}}
@ -45,14 +45,14 @@
{{/if}}
{{#if showNextButton}}
<button {{action "nextStep"}} disabled={{saving}} tabindex="10" class="wizard-btn next primary">
<button {{action "nextStep"}} disabled={{saving}} tabindex="10" type="button" class="wizard-btn next primary">
{{i18n "wizard.next"}}
{{d-icon "chevron-right"}}
</button>
{{/if}}
{{#if showDoneButton}}
<button {{action "quit"}} disabled={{saving}} tabindex="10" class="wizard-btn done">
<button {{action "quit"}} disabled={{saving}} tabindex="10" type="button" class="wizard-btn done">
{{i18n "wizard.done"}}
</button>
{{/if}}