Skip to content
Permalink
Browse files

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

  • Loading branch information
jjaffeux committed Feb 6, 2020
1 parent 0fd39cc commit dafd3c3b47f116c6c1dc56cb18df614c11747733
Showing with 45 additions and 43 deletions.
  1. +2 −2 .template-lintrc.js
  2. +1 −1 app/assets/javascripts/admin/templates/badges-award.hbs
  3. +1 −1 app/assets/javascripts/admin/templates/components/admin-user-field-item.hbs
  4. +1 −1 app/assets/javascripts/admin/templates/components/site-customization-change-field.hbs
  5. +1 −1 app/assets/javascripts/admin/templates/components/tags-uploader.hbs
  6. +1 −1 app/assets/javascripts/admin/templates/components/watched-word-uploader.hbs
  7. +1 −1 app/assets/javascripts/admin/templates/customize-colors-show.hbs
  8. +2 −2 app/assets/javascripts/admin/templates/email-advanced-test.hbs
  9. +1 −1 app/assets/javascripts/admin/templates/permalinks.hbs
  10. +1 −1 app/assets/javascripts/admin/templates/site-settings-category.hbs
  11. +2 −2 app/assets/javascripts/admin/templates/user-tl3-requirements.hbs
  12. +1 −1 app/assets/javascripts/discourse/templates/components/avatar-uploader.hbs
  13. +1 −1 app/assets/javascripts/discourse/templates/components/backup-uploader.hbs
  14. +1 −1 app/assets/javascripts/discourse/templates/components/color-input.hbs
  15. +1 −1 app/assets/javascripts/discourse/templates/components/csv-uploader.hbs
  16. +1 −1 app/assets/javascripts/discourse/templates/components/emoji-uploader.hbs
  17. +1 −1 app/assets/javascripts/discourse/templates/components/image-uploader.hbs
  18. +1 −1 app/assets/javascripts/discourse/templates/components/images-uploader.hbs
  19. +2 −2 app/assets/javascripts/discourse/templates/components/tag-groups-form.hbs
  20. +1 −1 app/assets/javascripts/discourse/templates/components/tag-info.hbs
  21. +1 −1 app/assets/javascripts/discourse/templates/components/tag-list.hbs
  22. +1 −1 app/assets/javascripts/discourse/templates/groups/new.hbs
  23. +2 −2 app/assets/javascripts/discourse/templates/invites/show.hbs
  24. +1 −1 app/assets/javascripts/discourse/templates/modal/jump-to-post.hbs
  25. +1 −1 app/assets/javascripts/discourse/templates/password-reset.hbs
  26. +2 −2 app/assets/javascripts/discourse/templates/preferences/account.hbs
  27. +1 −1 app/assets/javascripts/discourse/templates/preferences/categories.hbs
  28. +1 −1 app/assets/javascripts/discourse/templates/preferences/emails.hbs
  29. +1 −1 app/assets/javascripts/discourse/templates/preferences/interface.hbs
  30. +1 −1 app/assets/javascripts/discourse/templates/preferences/notifications.hbs
  31. +1 −1 app/assets/javascripts/discourse/templates/preferences/profile.hbs
  32. +1 −1 app/assets/javascripts/discourse/templates/preferences/tags.hbs
  33. +1 −1 app/assets/javascripts/discourse/templates/tag-groups.hbs
  34. +1 −1 app/assets/javascripts/discourse/templates/tags/index.hbs
  35. +1 −1 app/assets/javascripts/discourse/templates/user-private-messages-tags.hbs
  36. +1 −1 app/assets/javascripts/wizard/templates/components/wizard-field-image.hbs
  37. +3 −1 lefthook.yml
@@ -1,8 +1,8 @@
module.exports = {
extends: "recommended",
// extends: "recommended",
ignore: ["**/*.raw"],

rules: {
quotes: false
"self-closing-void-elements": true
}
};
@@ -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>
@@ -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>
@@ -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}}
@@ -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>
@@ -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>
@@ -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'>
@@ -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>
@@ -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}}
@@ -8,6 +8,6 @@
{{/if}}
{{/d-section}}
{{else}}
<br/>
<br>
{{i18n 'admin.site_settings.no_results'}}
{{/if}}
@@ -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}}
@@ -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}}
@@ -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>
@@ -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">
@@ -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>
@@ -7,5 +7,5 @@
class="hidden-upload-field"
disabled={{addDisabled}}
type="file"
accept=".png,.gif" />
accept=".png,.gif">
</label>
@@ -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}}
@@ -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>
@@ -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
@@ -16,7 +16,7 @@
{{/if}}
{{#if tagInfo.categories}}
{{categoriesInfo}}
<br/>
<br>
{{#each tagInfo.categories as |category|}}
{{category-link category}}
{{/each}}
@@ -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>
@@ -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}}
@@ -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>
@@ -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">
@@ -19,7 +19,7 @@
{{#if securityKeyOrSecondFactorRequired }}
{{#if errorMessage}}
<div class='alert alert-error'>{{errorMessage}}</div>
<br/>
<br>
{{/if}}
{{#if securityKeyRequired }}
{{#security-key-form
@@ -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>
@@ -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)}}

@@ -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)}}

@@ -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)}}

@@ -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)}}

@@ -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)}}

@@ -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)}}

@@ -23,5 +23,5 @@

{{outlet}}

<div class="clearfix" />
<div class="clearfix"></div>
</div>
@@ -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}}
@@ -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}}
@@ -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>
@@ -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

0 comments on commit dafd3c3

Please sign in to comment.
You can’t perform that action at this time.