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
|
||||
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() }}
|
||||
|
|
|
@ -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")}}
|
||||
|
||||
<span class="docs-item-id category-id">{{categoryName}}</span>
|
||||
<span class="docs-item-count category-count">{{category.count}}</span>
|
||||
</a>
|
||||
</a>
|
|
@ -10,8 +10,12 @@
|
|||
}}
|
||||
|
||||
{{#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}}
|
||||
{{d-icon "search"}}
|
||||
{{/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}}
|
||||
{{d-icon "plus"}}
|
||||
{{/unless}}
|
||||
|
@ -9,4 +13,4 @@
|
|||
|
||||
<span class="docs-item-id tag-id">{{tag.id}}</span>
|
||||
<span class="docs-item-count tag-count">{{tag.count}}</span>
|
||||
</a>
|
||||
</a>
|
|
@ -34,4 +34,4 @@
|
|||
</table>
|
||||
{{/load-more}}
|
||||
|
||||
{{conditional-loading-spinner condition=loading}}
|
||||
{{conditional-loading-spinner condition=loading}}
|
|
@ -1,21 +1,14 @@
|
|||
{{d-button
|
||||
label="docs.topic.back"
|
||||
class="docs-nav-link return"
|
||||
action=return
|
||||
}}
|
||||
{{d-button label="docs.topic.back" class="docs-nav-link return" action=return}}
|
||||
|
||||
<div class="topic-content">
|
||||
<h1>{{html-safe topic.fancyTitle}}</h1>
|
||||
|
||||
{{mount-widget
|
||||
widget="post"
|
||||
model=model
|
||||
args=post
|
||||
}}
|
||||
{{mount-widget widget="post" model=model args=post}}
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
{{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}}
|
||||
{{#if noContent}}
|
||||
<EmptyState
|
||||
@title={{emptyState.title}}
|
||||
@body={{emptyState.body}}
|
||||
/>
|
||||
<EmptyState @title={{emptyState.title}} @body={{emptyState.body}} />
|
||||
{{else}}
|
||||
<div class="docs-browse">
|
||||
{{#if site.mobileView}}
|
||||
{{#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}}
|
||||
{{/if}}
|
||||
|
||||
|
@ -33,8 +35,26 @@
|
|||
<section class="item-controls">
|
||||
<h3>{{i18n "docs.categories"}}</h3>
|
||||
<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 class=(if (eq categorySort.type "numeric") "categories-amount active" "categories-amount") icon=categorySortNumericIcon action=toggleCategorySort actionParam="numeric"}}
|
||||
{{d-button
|
||||
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"}}
|
||||
</div>
|
||||
</section>
|
||||
|
@ -50,7 +70,9 @@
|
|||
<li>
|
||||
{{docs-category
|
||||
category=category
|
||||
selectCategory=(action "updateSelectedCategories" category)
|
||||
selectCategory=(action
|
||||
"updateSelectedCategories" category
|
||||
)
|
||||
}}
|
||||
</li>
|
||||
{{/each}}
|
||||
|
@ -63,8 +85,26 @@
|
|||
<section class="item-controls">
|
||||
<h3>{{i18n "docs.tags"}}</h3>
|
||||
<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 class=(if (eq tagSort.type "numeric") "tags-amount active" "tags-amount") icon=tagSortNumericIcon action=toggleTagSort actionParam="numeric"}}
|
||||
{{d-button
|
||||
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"}}
|
||||
</div>
|
||||
</section>
|
||||
|
@ -75,7 +115,12 @@
|
|||
placeholderKey="docs.tags_filter_placeholder"
|
||||
}}
|
||||
{{/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>
|
||||
{{#each sortedTags as |tag|}}
|
||||
<li class="docs-filter-tag-{{tag.id}}">
|
||||
|
@ -94,7 +139,11 @@
|
|||
{{#if selectedTopic}}
|
||||
{{#conditional-loading-spinner condition=isTopicLoading}}
|
||||
{{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}}
|
||||
{{else}}
|
||||
<div class="docs-results">
|
||||
|
@ -103,7 +152,11 @@
|
|||
<div class="result-count no-result">
|
||||
{{i18n "search.no_results"}}
|
||||
</div>
|
||||
{{plugin-outlet name="after-docs-empty-results" tagName="span" connectorTagName="div"}}
|
||||
{{plugin-outlet
|
||||
name="after-docs-empty-results"
|
||||
tagName="span"
|
||||
connectorTagName="div"
|
||||
}}
|
||||
{{else}}
|
||||
<div class="result-count">
|
||||
{{i18n "docs.search.results" count=topicCount}}
|
||||
|
@ -125,4 +178,4 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/conditional-loading-spinner}}
|
||||
{{/conditional-loading-spinner}}
|
|
@ -17,4 +17,4 @@
|
|||
}}
|
||||
|
||||
{{outlet}}
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue