DEV: enforces no self-closing-void-elements (#8879)

This commit is contained in:
Joffrey JAFFEUX 2020-02-06 17:26:06 +01:00 committed by GitHub
parent 0fd39cc511
commit dafd3c3b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 45 additions and 43 deletions

View File

@ -1,8 +1,8 @@
module.exports = {
extends: "recommended",
// extends: "recommended",
ignore: ["**/*.raw"],
rules: {
quotes: false
"self-closing-void-elements": true
}
};

View File

@ -14,7 +14,7 @@
</div>
<div>
<h4>{{I18n 'admin.badges.mass_award.upload_csv'}}</h4>
<input type='file' id='massAwardCSVUpload' accept='.csv' />
<input type='file' id='massAwardCSVUpload' accept='.csv'>
</div>
<div>
<label>

View File

@ -45,7 +45,7 @@
<div class="row">
<div class="form-display">
<strong>{{userField.name}}</strong>
<br/>
<br>
{{{userField.description}}}
</div>
<div class="form-display">{{fieldName}}</div>

View File

@ -1,7 +1,7 @@
{{#if field}}
<section class="field">
<b>{{i18n name}}</b>: ({{i18n 'character_count' count=field.length}})
<br/>
<br>
{{textarea value=field class="plain"}}
</section>
{{/if}}

View File

@ -1,6 +1,6 @@
<label class="btn {{if addDisabled 'disabled'}}">
{{d-icon "upload"}}
{{i18n 'admin.watched_words.form.upload'}}
<input class="hidden-upload-field" disabled={{addDisabled}} type="file" accept="text/plain,text/csv" />
<input class="hidden-upload-field" disabled={{addDisabled}} type="file" accept="text/plain,text/csv">
</label>
<span class="instructions">{{i18n 'tagging.upload_instructions'}}</span>

View File

@ -1,6 +1,6 @@
<label class="btn btn-default {{if addDisabled 'disabled'}}">
{{d-icon "upload"}}
{{i18n 'admin.watched_words.form.upload'}}
<input class="hidden-upload-field" disabled={{addDisabled}} type="file" accept="text/plain" />
<input class="hidden-upload-field" disabled={{addDisabled}} type="file" accept="text/plain">
</label>
<span class="instructions">{{i18n 'admin.watched_words.one_word_per_line'}}</span>

View File

@ -32,7 +32,7 @@
<span class="saving {{unless model.savingStatus 'hidden'}}">{{model.savingStatus}}</span>
</div>
<br/>
<br>
<div class='admin-controls'>
<div class='search controls'>

View File

@ -11,13 +11,13 @@
{{#conditional-loading-spinner condition=loading}}
{{#if format}}
<hr/>
<hr>
<div class="text">
<h3>{{i18n 'admin.email.advanced_test.text'}}</h3>
<pre class="full-reason">{{{text}}}</pre>
</div>
<hr/>
<hr>
<div class="elided">
<h3>{{i18n 'admin.email.advanced_test.elided'}}</h3>
<pre class="full-reason">{{{elided}}}</pre>

View File

@ -8,7 +8,7 @@
{{text-field value=filter class="url-input" placeholderKey="admin.permalink.form.filter" autocorrect="off" autocapitalize="off"}}
</div>
{{permalink-form action=(action "recordAdded")}}
<br/>
<br>
{{#conditional-loading-spinner condition=loading}}
{{#if model.length}}

View File

@ -8,6 +8,6 @@
{{/if}}
{{/d-section}}
{{else}}
<br/>
<br>
{{i18n 'admin.site_settings.no_results'}}
{{/if}}

View File

@ -9,7 +9,7 @@
<div class="admin-container tl3-requirements">
<h2>{{model.username}} - {{i18n 'admin.user.tl3_requirements.title'}}</h2>
<br/>
<br>
<p>{{i18n 'admin.user.tl3_requirements.table_title' count=model.tl3Requirements.time_period}}</p>
<table class="table" style="width: auto;">
@ -111,7 +111,7 @@
</tbody>
</table>
<br/>
<br>
<p>
{{#if model.istl3}}
{{#if model.tl3Requirements.requirements_lost}}

View File

@ -6,7 +6,7 @@
{{i18n 'upload'}}
{{/if}}
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept="image/*" />
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept="image/*">
</label>
{{#if imageIsNotASquare}}

View File

@ -1,4 +1,4 @@
<label class="btn" disabled={{uploading}} title="{{i18n 'admin.backups.upload.title'}}">
{{d-icon "upload"}}&nbsp;{{uploadButtonText}}
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept=".gz" />
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept=".gz">
</label>

View File

@ -1 +1 @@
{{text-field class="hex-input" value=hexValue maxlength="6"}} <input class="picker" type="input"/>
{{text-field class="hex-input" value=hexValue maxlength="6"}} <input class="picker" type="input">

View File

@ -1,6 +1,6 @@
<label class="btn" disabled={{uploadButtonDisabled}}>
{{d-icon "upload"}}&nbsp;{{uploadButtonText}}
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept=".csv" />
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept=".csv">
</label>
{{#if uploading}}
<span>{{i18n 'upload_selector.uploading'}} {{uploadProgress}}%</span>

View File

@ -7,5 +7,5 @@
class="hidden-upload-field"
disabled={{addDisabled}}
type="file"
accept=".png,.gif" />
accept=".png,.gif">
</label>

View File

@ -5,7 +5,7 @@
<div class="image-upload-controls">
<label class="btn btn-default pad-left no-text {{if uploading 'disabled'}}">
{{d-icon "far-image"}}
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept="image/*" />
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept="image/*">
</label>
{{#if imageUrl}}

View File

@ -1,6 +1,6 @@
<label class="btn" disabled={{uploading}} title="{{i18n "admin.site_settings.uploaded_image_list.upload.title"}}">
{{d-icon "far-image"}}&nbsp;{{uploadButtonText}}
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept="image/*" multiple />
<input class="hidden-upload-field" disabled={{uploading}} type="file" accept="image/*" multiple>
</label>
{{#if uploading}}
<span>{{i18n 'upload_selector.uploading'}} {{uploadProgress}}%</span>

View File

@ -1,9 +1,9 @@
<div class="tag-group-content">
<h1>{{text-field value=buffered.name}}</h1>
<br/>
<br>
<section class="group-tags-list">
<label>{{i18n 'tagging.groups.tags_label'}}</label><br/>
<label>{{i18n 'tagging.groups.tags_label'}}</label><br>
{{tag-chooser
tags=buffered.tag_names
everyTag=true

View File

@ -16,7 +16,7 @@
{{/if}}
{{#if tagInfo.categories}}
{{categoriesInfo}}
<br/>
<br>
{{#each tagInfo.categories as |category|}}
{{category-link category}}
{{/each}}

View File

@ -12,4 +12,4 @@
{{discourse-tag tag.id isPrivateMessage=isPrivateMessage pmOnly=tag.pmOnly tagsForUser=tagsForUser}} {{#if tag.pmOnly}}{{d-icon "far-envelope"}}{{/if}}{{#if tag.totalCount}} <span class='tag-count'>x {{tag.totalCount}}</span>{{/if}}
</div>
{{/each}}
<div class="clearfix" />
<div class="clearfix"></div>

View File

@ -1,7 +1,7 @@
{{#d-section pageClass="groups-new"}}
<h1>{{i18n "admin.groups.new.title"}}</h1>
<hr/>
<hr>
<form class="groups-form form-vertical">
{{#groups-form-profile-fields model=model disableSave=saving}}

View File

@ -9,7 +9,7 @@
<div class="col-form">
{{#if successMessage}}
<br/><br/>
<br><br>
<div class='alert alert-info'><p>{{{successMessage}}}</p></div>
{{else}}
<p>{{i18n 'invites.invited_by'}}</p>
@ -64,7 +64,7 @@
label="invites.accept_invite"}}
{{#if errorMessage}}
<br/><br/>
<br><br>
<div class='alert alert-error'>{{errorMessage}}</div>
{{/if}}
</form>

View File

@ -13,7 +13,7 @@
<span class="text">
{{i18n "topic.progress.jump_prompt_or"}}
</span>
<hr class="right" />
<hr class="right">
</div>
<div class="jump-to-date-control">

View File

@ -19,7 +19,7 @@
{{#if securityKeyOrSecondFactorRequired }}
{{#if errorMessage}}
<div class='alert alert-error'>{{errorMessage}}</div>
<br/>
<br>
{{/if}}
{{#if securityKeyRequired }}
{{#security-key-form

View File

@ -208,7 +208,7 @@
{{plugin-outlet name="user-preferences-account" args=(hash model=model save=(action "save"))}}
<br/>
<br>
{{plugin-outlet name="user-custom-controls" args=(hash model=model)}}
@ -223,7 +223,7 @@
{{#if model.canDeleteAccount}}
<div class="control-group delete-account">
<br/>
<br>
<div class="controls">
{{d-button action=(action "delete") disabled=deleteDisabled class="btn-danger" icon="far-trash-alt" label="user.delete_account"}}
</div>

View File

@ -57,7 +57,7 @@
{{plugin-outlet name="user-preferences-categories" args=(hash model=model save=(action "save"))}}
<br/>
<br>
{{plugin-outlet name="user-custom-controls" args=(hash model=model)}}

View File

@ -89,7 +89,7 @@
{{plugin-outlet name="user-preferences-emails" args=(hash model=model save=(action "save"))}}
<br/>
<br>
{{plugin-outlet name="user-custom-controls" args=(hash model=model)}}

View File

@ -95,7 +95,7 @@
{{plugin-outlet name="user-preferences-interface" args=(hash model=model save=(action "save"))}}
<br/>
<br>
{{plugin-outlet name="user-custom-controls" args=(hash model=model)}}

View File

@ -64,7 +64,7 @@
{{plugin-outlet name="user-preferences-notifications" args=(hash model=model save=(action "save"))}}
<br/>
<br>
{{plugin-outlet name="user-custom-controls" args=(hash model=model)}}

View File

@ -91,7 +91,7 @@
{{plugin-outlet name="user-custom-preferences" args=(hash model=model)}}
<br/>
<br>
{{plugin-outlet name="user-custom-controls" args=(hash model=model)}}

View File

@ -55,7 +55,7 @@
{{plugin-outlet name="user-preferences-tags" args=(hash model=model save=(action "save"))}}
<br/>
<br>
{{plugin-outlet name="user-custom-controls" args=(hash model=model)}}

View File

@ -23,5 +23,5 @@
{{outlet}}
<div class="clearfix" />
<div class="clearfix"></div>
</div>

View File

@ -17,7 +17,7 @@
<span class="tag-sort-name {{if sortedByName 'active'}}"><a {{action "sortById"}}>{{i18n "tagging.sort_by_name"}}</a></span>
</div>
<hr/>
<hr>
{{#each model.extras.categories as |category|}}
{{tag-list tags=category.tags sortProperties=sortProperties categoryId=category.id}}

View File

@ -10,7 +10,7 @@
<span class="tag-sort-name {{if sortedByName 'active'}}"><a {{action "sortById"}}>{{i18n "tagging.sort_by_name"}}</a></span>
</div>
<hr/>
<hr>
{{#if model}}
{{tag-list tags=model sortProperties=sortProperties titleKey="tagging.all_tags" isPrivateMessage=true tagsForUser=tagsForUser}}

View File

@ -10,5 +10,5 @@
{{d-icon "far-image"}}
{{/if}}
<input class="wizard-hidden-upload-field" disabled={{uploading}} type="file" accept="image/*" />
<input class="wizard-hidden-upload-field" disabled={{uploading}} type="file" accept="image/*">
</label>

View File

@ -6,8 +6,10 @@ pre-commit:
run: bundle exec rubocop {staged_files}
eslint:
glob: "*.{js,es6}"
exclude: 'vendor/*'
exclude: "vendor/*"
run: yarn eslint --ext .es6 -f compact {staged_files}
ember-template-lint:
run: yarn run ember-template-lint app
yaml-syntax:
glob: "*.{yaml,yml}"
# database.yml is an erb file not a yaml file