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 shell: bash
run: | run: |
yarn prettier -v 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 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}" yarn prettier --list-different "assets/**/*.{scss,js,es6,hbs}"
fi fi
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then 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}" yarn prettier --list-different "test/**/*.{js,es6}"
@ -50,7 +50,12 @@ jobs:
- name: Ember template lint - name: Ember template lint
if: ${{ !cancelled() }} 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 - name: Rubocop
if: ${{ !cancelled() }} if: ${{ !cancelled() }}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -88,7 +88,7 @@
</div> </div>
{{/if}} {{/if}}
{{#if (not selectedItem.destroyed)}} {{#unless selectedItem.destroyed}}
<div class="pull-left"> <div class="pull-left">
<div class="groups"> <div class="groups">
<span class="label">{{i18n "explorer.allow_groups"}}</span> <span class="label">{{i18n "explorer.allow_groups"}}</span>
@ -102,7 +102,7 @@
</span> </span>
</div> </div>
</div> </div>
{{/if}} {{/unless}}
<div class="clear"></div> <div class="clear"></div>
@ -365,4 +365,4 @@
<div class="explorer-pad-bottom"></div> <div class="explorer-pad-bottom"></div>
{{/if}} {{/if}}
{{/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"}} {{#link-to "group.reports"}}
{{d-icon "chart-bar"}}{{i18n "group.reports"}} {{d-icon "chart-bar"}}{{i18n "group.reports"}}
{{/link-to}} {{/link-to}}

View File

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

View File

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

View File

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

View File

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

View File

@ -31,4 +31,4 @@
</aside> </aside>
{{else}} {{else}}
{{id}} {{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}}) ({{topic.posts_count}})
{{else}} {{else}}
<a href="{{baseuri}}/t/{{id}}">{{id}}</a> <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> </a>
{{else}} {{else}}
{{id}} {{id}}
{{/if}} {{/if}}

View File

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

View File

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

View File

@ -3,4 +3,4 @@
{{html-safe (i18n "explorer.help.custom_params")}} {{html-safe (i18n "explorer.help.custom_params")}}
{{html-safe (i18n "explorer.help.default_values")}} {{html-safe (i18n "explorer.help.default_values")}}
{{html-safe (i18n "explorer.help.data_types")}} {{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