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-concat": true,
"no-unnecessary-component-helper": true, "no-unnecessary-component-helper": true,
"no-unused-block-params": true, "no-unused-block-params": true,
quotes: "double", "quotes": "double",
"require-button-type": false, "require-button-type": true,
"require-iframe-title": true, "require-iframe-title": true,
"require-valid-alt-text": false, "require-valid-alt-text": false,
"self-closing-void-elements": true, "self-closing-void-elements": true,

View File

@ -15,7 +15,7 @@
{{#each model.errors as |error|}} {{#each model.errors as |error|}}
<div class="alert alert-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}} {{error}}
</div> </div>
{{/each}} {{/each}}

View File

@ -33,7 +33,7 @@
{{#each errors as |error|}} {{#each errors as |error|}}
<div class="alert alert-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}} {{error}}
</div> </div>
{{/each}} {{/each}}

View File

@ -2,6 +2,6 @@
<form action="//google.com/search" id="google-search"> <form action="//google.com/search" id="google-search">
<input type="text" name="q" value={{searchTerm}}> <input type="text" name="q" value={{searchTerm}}>
<input name="as_sitesearch" value={{siteUrl}} type="hidden"> <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> </form>
</div> </div>

View File

@ -1,5 +1,5 @@
{{#each buttons as |b|}} {{#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}} {{#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> <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}} {{else if b.icon}}

View File

@ -4,7 +4,7 @@
{{clockIcon}} {{notice}} {{clockIcon}} {{notice}}
</span> </span>
{{#if showTrashCan}} {{#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}} {{trashCanIcon}}
</button> </button>
{{/if}} {{/if}}

View File

@ -1,6 +1,6 @@
<span class="email">{{user.email}}</span> <span class="email">{{user.email}}</span>
<span class="role">{{roleName}}</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"}} {{d-icon "times"}}
</button> </button>

View File

@ -19,7 +19,7 @@
onChange=(action (mut inviteRole)) 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"}} {{d-icon "plus"}}{{i18n "wizard.invites.add_user"}}
</button> </button>
</div> </div>

View File

@ -35,7 +35,7 @@
{{/if}} {{/if}}
{{#if showFinishButton}} {{#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"}} {{i18n "wizard.finish"}}
</button> </button>
{{/if}} {{/if}}
@ -45,14 +45,14 @@
{{/if}} {{/if}}
{{#if showNextButton}} {{#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"}} {{i18n "wizard.next"}}
{{d-icon "chevron-right"}} {{d-icon "chevron-right"}}
</button> </button>
{{/if}} {{/if}}
{{#if showDoneButton}} {{#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"}} {{i18n "wizard.done"}}
</button> </button>
{{/if}} {{/if}}