DEV: Update eslint-config-discourse, use prettier for hbs (#119)
This commit is contained in:
parent
724100044c
commit
1bb737feb0
|
@ -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() }}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<a href {{action this.selectCategory}} class="docs-item docs-category {{if category.active "selected"}}">
|
<a
|
||||||
|
href
|
||||||
|
{{action this.selectCategory}}
|
||||||
|
class="docs-item docs-category {{if category.active 'selected'}}"
|
||||||
|
>
|
||||||
{{d-icon (if category.active "times-circle" "far-circle")}}
|
{{d-icon (if category.active "times-circle" "far-circle")}}
|
||||||
|
|
||||||
<span class="docs-item-id category-id">{{categoryName}}</span>
|
<span class="docs-item-id category-id">{{categoryName}}</span>
|
||||||
<span class="docs-item-count category-count">{{category.count}}</span>
|
<span class="docs-item-count category-count">{{category.count}}</span>
|
||||||
</a>
|
</a>
|
|
@ -10,8 +10,12 @@
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{#if searchTerm}}
|
{{#if searchTerm}}
|
||||||
{{d-button action=(action "clearSearch") class="clear-search" label="docs.search.clear"}}
|
{{d-button
|
||||||
|
action=(action "clearSearch")
|
||||||
|
class="clear-search"
|
||||||
|
label="docs.search.clear"
|
||||||
|
}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{d-icon "search"}}
|
{{d-icon "search"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
|
@ -1,4 +1,8 @@
|
||||||
<a href {{action this.selectTag}} class="docs-item docs-tag {{if tag.active "selected"}} {{if subtag "subtag"}}">
|
<a
|
||||||
|
href
|
||||||
|
{{action this.selectTag}}
|
||||||
|
class="docs-item docs-tag {{if tag.active 'selected'}} {{if subtag 'subtag'}}"
|
||||||
|
>
|
||||||
{{#unless tag.active}}
|
{{#unless tag.active}}
|
||||||
{{d-icon "plus"}}
|
{{d-icon "plus"}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
@ -9,4 +13,4 @@
|
||||||
|
|
||||||
<span class="docs-item-id tag-id">{{tag.id}}</span>
|
<span class="docs-item-id tag-id">{{tag.id}}</span>
|
||||||
<span class="docs-item-count tag-count">{{tag.count}}</span>
|
<span class="docs-item-count tag-count">{{tag.count}}</span>
|
||||||
</a>
|
</a>
|
|
@ -34,4 +34,4 @@
|
||||||
</table>
|
</table>
|
||||||
{{/load-more}}
|
{{/load-more}}
|
||||||
|
|
||||||
{{conditional-loading-spinner condition=loading}}
|
{{conditional-loading-spinner condition=loading}}
|
|
@ -1,21 +1,14 @@
|
||||||
{{d-button
|
{{d-button label="docs.topic.back" class="docs-nav-link return" action=return}}
|
||||||
label="docs.topic.back"
|
|
||||||
class="docs-nav-link return"
|
|
||||||
action=return
|
|
||||||
}}
|
|
||||||
|
|
||||||
<div class="topic-content">
|
<div class="topic-content">
|
||||||
<h1>{{html-safe topic.fancyTitle}}</h1>
|
<h1>{{html-safe topic.fancyTitle}}</h1>
|
||||||
|
|
||||||
{{mount-widget
|
{{mount-widget widget="post" model=model args=post}}
|
||||||
widget="post"
|
|
||||||
model=model
|
|
||||||
args=post
|
|
||||||
}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a class="docs-nav-link more" href="/t/{{topic.id}}">
|
<a class="docs-nav-link more" href="/t/{{topic.id}}">
|
||||||
{{d-icon "far-comment"}} {{i18n "docs.topic.navigate_to_topic"}}
|
{{d-icon "far-comment"}}
|
||||||
|
{{i18n "docs.topic.navigate_to_topic"}}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{{plugin-outlet name="after-docs-topic" tagName="span" connectorTagName="div"}}
|
{{plugin-outlet name="after-docs-topic" tagName="span" connectorTagName="div"}}
|
|
@ -1,14 +1,16 @@
|
||||||
{{#conditional-loading-spinner condition=isLoading}}
|
{{#conditional-loading-spinner condition=isLoading}}
|
||||||
{{#if noContent}}
|
{{#if noContent}}
|
||||||
<EmptyState
|
<EmptyState @title={{emptyState.title}} @body={{emptyState.body}} />
|
||||||
@title={{emptyState.title}}
|
|
||||||
@body={{emptyState.body}}
|
|
||||||
/>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="docs-browse">
|
<div class="docs-browse">
|
||||||
{{#if site.mobileView}}
|
{{#if site.mobileView}}
|
||||||
{{#unless selectedTopic}}
|
{{#unless selectedTopic}}
|
||||||
{{d-button class="docs-expander" icon=(if expandedFilters "angle-up" "angle-down") action=(action "toggleFilters") label="docs.filter_button"}}
|
{{d-button
|
||||||
|
class="docs-expander"
|
||||||
|
icon=(if expandedFilters "angle-up" "angle-down")
|
||||||
|
action=(action "toggleFilters")
|
||||||
|
label="docs.filter_button"
|
||||||
|
}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -33,8 +35,26 @@
|
||||||
<section class="item-controls">
|
<section class="item-controls">
|
||||||
<h3>{{i18n "docs.categories"}}</h3>
|
<h3>{{i18n "docs.categories"}}</h3>
|
||||||
<div class="item-controls-buttons">
|
<div class="item-controls-buttons">
|
||||||
{{d-button class=(if (eq categorySort.type "alpha") "categories-alphabet active" "categories-alphabet") icon=categorySortAlphaIcon action=toggleCategorySort actionParam="alpha"}}
|
{{d-button
|
||||||
{{d-button class=(if (eq categorySort.type "numeric") "categories-amount active" "categories-amount") icon=categorySortNumericIcon action=toggleCategorySort actionParam="numeric"}}
|
class=(if
|
||||||
|
(eq categorySort.type "alpha")
|
||||||
|
"categories-alphabet active"
|
||||||
|
"categories-alphabet"
|
||||||
|
)
|
||||||
|
icon=categorySortAlphaIcon
|
||||||
|
action=toggleCategorySort
|
||||||
|
actionParam="alpha"
|
||||||
|
}}
|
||||||
|
{{d-button
|
||||||
|
class=(if
|
||||||
|
(eq categorySort.type "numeric")
|
||||||
|
"categories-amount active"
|
||||||
|
"categories-amount"
|
||||||
|
)
|
||||||
|
icon=categorySortNumericIcon
|
||||||
|
action=toggleCategorySort
|
||||||
|
actionParam="numeric"
|
||||||
|
}}
|
||||||
{{plugin-outlet name="categories-controls-buttons-bottom"}}
|
{{plugin-outlet name="categories-controls-buttons-bottom"}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -50,7 +70,9 @@
|
||||||
<li>
|
<li>
|
||||||
{{docs-category
|
{{docs-category
|
||||||
category=category
|
category=category
|
||||||
selectCategory=(action "updateSelectedCategories" category)
|
selectCategory=(action
|
||||||
|
"updateSelectedCategories" category
|
||||||
|
)
|
||||||
}}
|
}}
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
@ -63,8 +85,26 @@
|
||||||
<section class="item-controls">
|
<section class="item-controls">
|
||||||
<h3>{{i18n "docs.tags"}}</h3>
|
<h3>{{i18n "docs.tags"}}</h3>
|
||||||
<div class="item-controls-buttons">
|
<div class="item-controls-buttons">
|
||||||
{{d-button class=(if (eq tagSort.type "alpha") "tags-alphabet active" "tags-alphabet") icon=tagSortAlphaIcon action=toggleTagSort actionParam="alpha"}}
|
{{d-button
|
||||||
{{d-button class=(if (eq tagSort.type "numeric") "tags-amount active" "tags-amount") icon=tagSortNumericIcon action=toggleTagSort actionParam="numeric"}}
|
class=(if
|
||||||
|
(eq tagSort.type "alpha")
|
||||||
|
"tags-alphabet active"
|
||||||
|
"tags-alphabet"
|
||||||
|
)
|
||||||
|
icon=tagSortAlphaIcon
|
||||||
|
action=toggleTagSort
|
||||||
|
actionParam="alpha"
|
||||||
|
}}
|
||||||
|
{{d-button
|
||||||
|
class=(if
|
||||||
|
(eq tagSort.type "numeric")
|
||||||
|
"tags-amount active"
|
||||||
|
"tags-amount"
|
||||||
|
)
|
||||||
|
icon=tagSortNumericIcon
|
||||||
|
action=toggleTagSort
|
||||||
|
actionParam="numeric"
|
||||||
|
}}
|
||||||
{{plugin-outlet name="tags-controls-buttons-bottom"}}
|
{{plugin-outlet name="tags-controls-buttons-bottom"}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -75,7 +115,12 @@
|
||||||
placeholderKey="docs.tags_filter_placeholder"
|
placeholderKey="docs.tags_filter_placeholder"
|
||||||
}}
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{plugin-outlet name="before-docs-tag-list" tagName="" connectorTagName="div" args=(hash tags=tags updateSelectedTags=updateSelectedTags)}}
|
{{plugin-outlet
|
||||||
|
name="before-docs-tag-list"
|
||||||
|
tagName=""
|
||||||
|
connectorTagName="div"
|
||||||
|
args=(hash tags=tags updateSelectedTags=updateSelectedTags)
|
||||||
|
}}
|
||||||
<ul>
|
<ul>
|
||||||
{{#each sortedTags as |tag|}}
|
{{#each sortedTags as |tag|}}
|
||||||
<li class="docs-filter-tag-{{tag.id}}">
|
<li class="docs-filter-tag-{{tag.id}}">
|
||||||
|
@ -94,7 +139,11 @@
|
||||||
{{#if selectedTopic}}
|
{{#if selectedTopic}}
|
||||||
{{#conditional-loading-spinner condition=isTopicLoading}}
|
{{#conditional-loading-spinner condition=isTopicLoading}}
|
||||||
{{docs-topic topic=topic return=(action "returnToList")}}
|
{{docs-topic topic=topic return=(action "returnToList")}}
|
||||||
{{plugin-outlet name="below-docs-topic" tagName="" connectorTagName="div"}}
|
{{plugin-outlet
|
||||||
|
name="below-docs-topic"
|
||||||
|
tagName=""
|
||||||
|
connectorTagName="div"
|
||||||
|
}}
|
||||||
{{/conditional-loading-spinner}}
|
{{/conditional-loading-spinner}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="docs-results">
|
<div class="docs-results">
|
||||||
|
@ -103,7 +152,11 @@
|
||||||
<div class="result-count no-result">
|
<div class="result-count no-result">
|
||||||
{{i18n "search.no_results"}}
|
{{i18n "search.no_results"}}
|
||||||
</div>
|
</div>
|
||||||
{{plugin-outlet name="after-docs-empty-results" tagName="span" connectorTagName="div"}}
|
{{plugin-outlet
|
||||||
|
name="after-docs-empty-results"
|
||||||
|
tagName="span"
|
||||||
|
connectorTagName="div"
|
||||||
|
}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="result-count">
|
<div class="result-count">
|
||||||
{{i18n "docs.search.results" count=topicCount}}
|
{{i18n "docs.search.results" count=topicCount}}
|
||||||
|
@ -125,4 +178,4 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/conditional-loading-spinner}}
|
{{/conditional-loading-spinner}}
|
|
@ -17,4 +17,4 @@
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue