Skip to content

Commit

Permalink
DEV: Update linting (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq authored Nov 20, 2024
1 parent 596e1f7 commit cac6557
Show file tree
Hide file tree
Showing 15 changed files with 302 additions and 311 deletions.
8 changes: 4 additions & 4 deletions assets/javascripts/discourse/components/emoji-images.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{#if siteSettings.enable_emoji}}
<div title={{titleText}}>
{{#each emojiHTML as |html|}}
{{#if this.siteSettings.enable_emoji}}
<div title={{this.titleText}}>
{{#each this.emojiHTML as |html|}}
{{html-safe html}}
{{/each}}
</div>
{{else}}
{{d-icon "birthday-cake" title=titleText}}
{{d-icon "birthday-cake" title=this.titleText}}
{{/if}}
4 changes: 2 additions & 2 deletions assets/javascripts/discourse/templates/cakeday.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<div class="container cakeday">
<ul class="nav-pills">
{{#if cakedayEnabled}}
{{#if this.cakedayEnabled}}
<li class="nav-item-anniversaries">
<LinkTo @route="cakeday.anniversaries">
{{i18n "anniversaries.title"}}
</LinkTo>
</li>
{{/if}}

{{#if birthdayEnabled}}
{{#if this.birthdayEnabled}}
<li class="nav-item-birthdays">
<LinkTo @route="cakeday.birthdays">
{{i18n "birthdays.title"}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<div class="cakeday-months">
<h2 class="cakeday-header">{{i18n "anniversaries.month.title"}}</h2>
<ComboBox
@content={{months}}
@value={{month}}
@content={{this.months}}
@value={{this.month}}
@valueAttribute="value"
@none="cakeday.none"
/>
</div>

<ConditionalLoadingSpinner @condition={{model.loading}}>
<UserInfoList @users={{model}}>
<ConditionalLoadingSpinner @condition={{this.model.loading}}>
<UserInfoList @users={{this.model}}>
{{i18n "anniversaries.month.empty"}}
</UserInfoList>
</ConditionalLoadingSpinner>

<ConditionalLoadingSpinner @condition={{model.loadingMore}} />
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
</LoadMore>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h2 class="cakeday-header">{{title}}</h2>
<h2 class="cakeday-header">{{this.title}}</h2>

<LoadMore @selector=".user-info" @action={{action "loadMore"}}>
<ConditionalLoadingSpinner @condition={{model.loading}}>
<UserInfoList @users={{model}}>
<ConditionalLoadingSpinner @condition={{this.model.loading}}>
<UserInfoList @users={{this.model}}>
{{i18n "anniversaries.today.empty"}}
</UserInfoList>
</ConditionalLoadingSpinner>

<ConditionalLoadingSpinner @condition={{model.loadingMore}} />
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
</LoadMore>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h2 class="cakeday-header">{{title}}</h2>
<h2 class="cakeday-header">{{this.title}}</h2>

<LoadMore @selector=".user-info" @action={{action "loadMore"}}>
<ConditionalLoadingSpinner @condition={{model.loading}}>
<UserInfoList @users={{model}}>
<ConditionalLoadingSpinner @condition={{this.model.loading}}>
<UserInfoList @users={{this.model}}>
{{i18n "anniversaries.tomorrow.empty"}}
</UserInfoList>
</ConditionalLoadingSpinner>

<ConditionalLoadingSpinner @condition={{model.loadingMore}} />
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
</LoadMore>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h2 class="cakeday-header">{{title}}</h2>
<h2 class="cakeday-header">{{this.title}}</h2>

<LoadMore @selector=".user-info" @action={{action "loadMore"}}>
<ConditionalLoadingSpinner @condition={{model.loading}}>
<UserInfoList @users={{model}}>
<ConditionalLoadingSpinner @condition={{this.model.loading}}>
<UserInfoList @users={{this.model}}>
{{i18n "anniversaries.upcoming.empty"}}
</UserInfoList>
</ConditionalLoadingSpinner>

<ConditionalLoadingSpinner @condition={{model.loadingMore}} />
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
</LoadMore>
10 changes: 5 additions & 5 deletions assets/javascripts/discourse/templates/cakeday/birthdays/all.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<div class="cakeday-months">
<h2 class="cakeday-header">{{i18n "birthdays.month.title"}}</h2>
<ComboBox
@content={{months}}
@value={{month}}
@content={{this.months}}
@value={{this.month}}
@valueAttribute="value"
@none="cakeday.none"
/>
</div>

<ConditionalLoadingSpinner @condition={{model.loading}}>
<UserInfoList @users={{model}} @isBirthday={{true}}>
<ConditionalLoadingSpinner @condition={{this.model.loading}}>
<UserInfoList @users={{this.model}} @isBirthday={{true}}>
{{i18n "birthdays.month.empty"}}
</UserInfoList>
</ConditionalLoadingSpinner>

<ConditionalLoadingSpinner @condition={{model.loadingMore}} />
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
</LoadMore>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h2 class="cakeday-header">{{title}}</h2>
<h2 class="cakeday-header">{{this.title}}</h2>

<LoadMore @selector=".user-info" @action={{action "loadMore"}}>
<ConditionalLoadingSpinner @condition={{model.loading}}>
<UserInfoList @users={{model}} @isBirthday={{true}}>
<ConditionalLoadingSpinner @condition={{this.model.loading}}>
<UserInfoList @users={{this.model}} @isBirthday={{true}}>
{{i18n "birthdays.today.empty"}}
</UserInfoList>
</ConditionalLoadingSpinner>

<ConditionalLoadingSpinner @condition={{model.loadingMore}} />
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
</LoadMore>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h2 class="cakeday-header">{{title}}</h2>
<h2 class="cakeday-header">{{this.title}}</h2>

<LoadMore @selector=".user-info" @action={{action "loadMore"}}>
<ConditionalLoadingSpinner @condition={{model.loading}}>
<UserInfoList @users={{model}} @isBirthday={{true}}>
<ConditionalLoadingSpinner @condition={{this.model.loading}}>
<UserInfoList @users={{this.model}} @isBirthday={{true}}>
{{i18n "birthdays.tomorrow.empty"}}
</UserInfoList>
</ConditionalLoadingSpinner>

<ConditionalLoadingSpinner @condition={{model.loadingMore}} />
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
</LoadMore>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h2 class="cakeday-header">{{title}}</h2>
<h2 class="cakeday-header">{{this.title}}</h2>

<LoadMore @selector=".user-info" @action={{action "loadMore"}}>
<ConditionalLoadingSpinner @condition={{model.loading}}>
<UserInfoList @users={{model}} @isBirthday={{true}}>
<ConditionalLoadingSpinner @condition={{this.model.loading}}>
<UserInfoList @users={{this.model}} @isBirthday={{true}}>
{{i18n "birthdays.upcoming.empty"}}
</UserInfoList>
</ConditionalLoadingSpinner>

<ConditionalLoadingSpinner @condition={{model.loadingMore}} />
<ConditionalLoadingSpinner @condition={{this.model.loadingMore}} />
</LoadMore>
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{{#if siteSettings.cakeday_birthday_enabled}}
{{#if isBirthday}}
{{#if this.siteSettings.cakeday_birthday_enabled}}
{{#if this.isBirthday}}
<EmojiImages
@list={{siteSettings.cakeday_birthday_emoji}}
@title={{birthdayTitle}}
@list={{this.siteSettings.cakeday_birthday_emoji}}
@title={{this.birthdayTitle}}
/>
{{/if}}
{{/if}}
{{#if siteSettings.cakeday_enabled}}
{{#if isCakeday}}
<EmojiImages @list={{siteSettings.cakeday_emoji}} @title={{cakedayTitle}} />
{{#if this.siteSettings.cakeday_enabled}}
{{#if this.isCakeday}}
<EmojiImages
@list={{this.siteSettings.cakeday_emoji}}
@title={{this.cakedayTitle}}
/>
{{/if}}
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{{#if siteSettings.cakeday_birthday_enabled}}
{{#if this.siteSettings.cakeday_birthday_enabled}}
<div class="control-group">
<label class="control-label">{{i18n "user.date_of_birth.label"}}</label>
<div class="controls">
<ComboBox
@content={{months}}
@value={{month}}
@content={{this.months}}
@value={{this.month}}
@valueAttribute="value"
@valueProperty="value"
@none="cakeday.none"
@options={{hash clearable=true autoInsertNoneItem=false}}
@onChange={{action (mut month)}}
@onChange={{action (mut this.month)}}
/>

<ComboBox
@content={{days}}
@value={{day}}
@content={{this.days}}
@value={{this.day}}
@valueProperty={{null}}
@nameProperty={{null}}
@none="cakeday.none"
@options={{hash clearable=true autoInsertNoneItem=false}}
@onChange={{action (mut day)}}
@onChange={{action (mut this.day)}}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{{#if siteSettings.cakeday_birthday_enabled}}
{{#if isBirthday}}
{{#if this.siteSettings.cakeday_birthday_enabled}}
{{#if this.isBirthday}}
<EmojiImages
@list={{siteSettings.cakeday_birthday_emoji}}
@title={{birthdayTitle}}
@list={{this.siteSettings.cakeday_birthday_emoji}}
@title={{this.birthdayTitle}}
/>
{{/if}}
{{/if}}
{{#if siteSettings.cakeday_enabled}}
{{#if isCakeday}}
<EmojiImages @list={{siteSettings.cakeday_emoji}} @title={{cakedayTitle}} />
{{#if this.siteSettings.cakeday_enabled}}
{{#if this.isCakeday}}
<EmojiImages
@list={{this.siteSettings.cakeday_emoji}}
@title={{this.cakedayTitle}}
/>
{{/if}}
{{/if}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"devDependencies": {
"@discourse/lint-configs": "2.0.1",
"@discourse/lint-configs": "2.2.0",
"ember-template-lint": "6.0.0",
"eslint": "9.14.0",
"prettier": "2.8.8"
Expand Down
Loading

0 comments on commit cac6557

Please sign in to comment.