DEV: Update eslint-config-discourse, use prettier for hbs (#212)

This commit is contained in:
David Taylor 2023-01-04 12:36:14 +00:00 committed by GitHub
parent 27b30b5efb
commit b1df914549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 1476 additions and 427 deletions

View File

@ -41,8 +41,8 @@ jobs:
shell: bash
run: |
yarn prettier -v
if [ 0 -lt $(find assets admin/assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
if [ 0 -lt $(find assets admin/assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" -or -name "*.hbs" \) 2> /dev/null | wc -l) ]; then
yarn prettier --list-different "assets/**/*.{scss,js,es6,hbs}"
fi
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
yarn prettier --list-different "test/**/*.{js,es6}"
@ -50,7 +50,12 @@ jobs:
- name: Ember template lint
if: ${{ !cancelled() }}
run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts admin/assets/javascripts
run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts
# Separated due to https://github.com/ember-template-lint/ember-template-lint/issues/2758
- name: Ember template lint (admin)
if: ${{ !cancelled() }}
run: yarn ember-template-lint --no-error-on-unmatched-pattern admin/assets/javascripts
- name: Rubocop
if: ${{ !cancelled() }}

View File

@ -1,4 +1,4 @@
<canvas
{{did-insert this.initChart}}
{{on "change" this.updateChartData}}
></canvas>
></canvas>

View File

@ -31,4 +31,4 @@
</div>
</ConditionalLoadingSpinner>
</div>
</div>
</div>

View File

@ -4,4 +4,4 @@
{{enum.name}}
</li>
{{/each}}
</ol>
</ol>

View File

@ -1,4 +1,6 @@
{{! template-lint-disable no-invalid-interactive }}
<li class="schema-table {{this.styles}}" {{on "click" this.toggleOpen}}>
{{! template-lint-enable no-invalid-interactive }}
<div class="schema-table-name">
{{#if this.open}}
{{d-icon "caret-down"}}
@ -47,4 +49,4 @@
</dl>
{{/if}}
</div>
</li>
</li>

View File

@ -52,4 +52,4 @@
<TextField @value={{this.value}} @onChange={{this.updateValue}} />
<span class="param-name">{{@info.identifier}}</span>
{{/if}}
</div>
</div>

View File

@ -9,4 +9,4 @@
/>
{{/each}}
</div>
{{/if}}
{{/if}}

View File

@ -87,4 +87,4 @@
</table>
{{/if}}
</section>
</article>
</article>

View File

@ -8,4 +8,4 @@
{{/each}}
{{/if}}
</div>
{{/if}}
{{/if}}

View File

@ -2,4 +2,4 @@
{{#each this.results as |result|}}
<td>{{result}}</td>
{{/each}}
</tr>
</tr>

View File

@ -22,4 +22,4 @@
/>
</div>
{{/if}}
</div>
</div>

View File

@ -88,7 +88,7 @@
</div>
{{/if}}
{{#if (not selectedItem.destroyed)}}
{{#unless selectedItem.destroyed}}
<div class="pull-left">
<div class="groups">
<span class="label">{{i18n "explorer.allow_groups"}}</span>
@ -102,7 +102,7 @@
</span>
</div>
</div>
{{/if}}
{{/unless}}
<div class="clear"></div>
@ -365,4 +365,4 @@
<div class="explorer-pad-bottom"></div>
{{/if}}
{{/if}}
{{/explorer-container}}
{{/explorer-container}}

View File

@ -1 +1 @@
<pre><code class={{codeClass}}>{{value}}</code></pre>
<pre><code class={{codeClass}}>{{value}}</code></pre>

View File

@ -1,3 +1,3 @@
{{#link-to "group.reports"}}
{{d-icon "chart-bar"}}{{i18n "group.reports"}}
{{/link-to}}
{{/link-to}}

View File

@ -7,4 +7,4 @@
>
{{icon-or-image badge.icon}}
<span class="badge-display-name">{{badge.display_name}}</span>
</a>
</a>

View File

@ -2,4 +2,4 @@
{{category-link category}}
{{else}}
<a href="{{baseuri}}/t/{{id}}">{{id}}</a>
{{/if}}
{{/if}}

View File

@ -2,4 +2,4 @@
<a href="{{baseuri}}/groups/{{group.name}}">{{group.name}}</a>
{{else}}
{{id}}
{{/if}}
{{/if}}

View File

@ -1 +1 @@
{{html-safe value}}
{{html-safe value}}

View File

@ -31,4 +31,4 @@
</aside>
{{else}}
{{id}}
{{/if}}
{{/if}}

View File

@ -1 +1 @@
{{reltime value}}
{{reltime value}}

View File

@ -1 +1 @@
{{value}}
{{value}}

View File

@ -5,4 +5,4 @@
({{topic.posts_count}})
{{else}}
<a href="{{baseuri}}/t/{{id}}">{{id}}</a>
{{/if}}
{{/if}}

View File

@ -1 +1 @@
<a href={{href}}>{{target}}</a>
<a href={{href}}>{{target}}</a>

View File

@ -8,4 +8,4 @@
</a>
{{else}}
{{id}}
{{/if}}
{{/if}}

View File

@ -29,4 +29,4 @@
{{/each}}
</tbody>
</table>
</section>
</section>

View File

@ -39,4 +39,4 @@
{{/if}}
</div>
{{/if}}
</section>
</section>

View File

@ -3,4 +3,4 @@
{{html-safe (i18n "explorer.help.custom_params")}}
{{html-safe (i18n "explorer.help.default_values")}}
{{html-safe (i18n "explorer.help.data_types")}}
{{/d-modal-body}}
{{/d-modal-body}}

1834
yarn.lock

File diff suppressed because it is too large Load Diff