Skip to content

Commit cb138a4

Browse files
DEV: Update linting (#47)
1 parent a1713b8 commit cb138a4

File tree

7 files changed

+33
-17
lines changed

7 files changed

+33
-17
lines changed

javascripts/discourse/components/featured-homepage-topics.hbs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
<DButton
1111
class={{concat-class
1212
"featured-topic-toggle"
13-
(if toggleTopics "is-open")
13+
(if this.toggleTopics "is-open")
1414
}}
1515
@action={{action "toggle"}}
1616
@translatedLabel={{this.featuredTitle}}
1717
>
18-
{{#if toggleTopics}}
18+
{{#if this.toggleTopics}}
1919
{{d-icon "angle-right"}}
2020
{{else}}
2121
{{d-icon "angle-down"}}
@@ -27,7 +27,10 @@
2727
class={{concat-class
2828
"featured-topic-wrapper"
2929
this.mobileStyle
30-
(if (and toggleTopics (theme-setting "make_collapsible")) "hidden")
30+
(if
31+
(and this.toggleTopics (theme-setting "make_collapsible"))
32+
"hidden"
33+
)
3134
}}
3235
>
3336
{{#if

javascripts/discourse/components/featured-homepage-topics.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ export default class FeaturedHomepageTopics extends Component {
2626
this.router.on("routeDidChange", this.checkShowHere);
2727
}
2828

29+
willDestroy() {
30+
super.willDestroy(...arguments);
31+
this.router.off("routeDidChange", this.checkShowHere);
32+
}
33+
2934
@action
3035
toggle() {
3136
this.toggleTopics = !this.toggleTopics;
3237
this.keyValueStore.setItem("toggleTopicsState", this.toggleTopics);
3338
}
3439

35-
willDestroy() {
36-
super.willDestroy(...arguments);
37-
this.router.off("routeDidChange", this.checkShowHere);
38-
}
39-
4040
@action
4141
checkShowHere() {
4242
document.body.classList.toggle(FEATURED_CLASS, this.showHere);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{{#if switchOutletToAboveMainContainer}}
1+
{{#if this.switchOutletToAboveMainContainer}}
22
{{featured-homepage-topics}}
33
{{/if}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{{#if switchOutletToBelowDiscoveryCategories}}
1+
{{#if this.switchOutletToBelowDiscoveryCategories}}
22
{{featured-homepage-topics}}
33
{{/if}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{{#unless switchOutlet}}
1+
{{#unless this.switchOutlet}}
22
{{featured-homepage-topics}}
33
{{/unless}}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"devDependencies": {
4-
"@discourse/lint-configs": "2.0.1",
4+
"@discourse/lint-configs": "2.2.1",
55
"ember-template-lint": "6.0.0",
66
"eslint": "9.14.0",
77
"prettier": "2.8.8"

pnpm-lock.yaml

Lines changed: 18 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)