Skip to content

Commit 160877f

Browse files
DEV: Update linting (#86)
1 parent c31d4f7 commit 160877f

File tree

8 files changed

+277
-292
lines changed

8 files changed

+277
-292
lines changed

assets/javascripts/discourse/templates/components/teambuild-choice.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<div class="teambuild-choice {{if completed 'completed' 'incomplete'}}">
1+
<div class="teambuild-choice {{if this.completed 'completed' 'incomplete'}}">
22
<div class="controls">
3-
{{#if readOnly}}
4-
{{#if completed}}
3+
{{#if this.readOnly}}
4+
{{#if this.completed}}
55
{{d-icon "check"}}
66
{{/if}}
77
{{else}}
8-
{{#if completed}}
8+
{{#if this.completed}}
99
<DButton
1010
@icon="check"
1111
@action={{action "undo"}}
@@ -21,5 +21,5 @@
2121
{{/if}}
2222
{{/if}}
2323
</div>
24-
<div class="choice-label">{{label}}</div>
24+
<div class="choice-label">{{this.label}}</div>
2525
</div>

assets/javascripts/discourse/templates/components/teambuild-target.hbs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<div class="teambuild-target {{if editing 'editing'}}">
1+
<div class="teambuild-target {{if this.editing 'editing'}}">
22
<div class="target-details">
3-
{{#if editing}}
3+
{{#if this.editing}}
44
<div class="fields">
55
<div class="target-types">
6-
{{#each targetTypes as |type|}}
6+
{{#each this.targetTypes as |type|}}
77
<label>
88
<RadioButton
99
@value={{type.id}}
10-
@selection={{buffered.target_type_id}}
11-
@onChange={{action (mut buffered.target_type_id) type.id}}
10+
@selection={{this.buffered.target_type_id}}
11+
@onChange={{action (mut this.buffered.target_type_id) type.id}}
1212
class={{type.name}}
1313
/>
1414
{{i18n (concat "discourse_teambuild.targets.types." type.name)}}
@@ -18,44 +18,44 @@
1818

1919
<div class="target-name">
2020
<Input
21-
@value={{buffered.name}}
21+
@value={{this.buffered.name}}
2222
placeholder={{i18n "discourse_teambuild.targets.name"}}
2323
autofocus="true"
2424
/>
2525
</div>
2626

27-
{{#if needsGroup}}
27+
{{#if this.needsGroup}}
2828
<ComboBox
29-
@content={{groups}}
30-
@value={{buffered.group_id}}
29+
@content={{this.groups}}
30+
@value={{this.buffered.group_id}}
3131
@none="discourse_teambuild.targets.choose_group"
3232
/>
3333
{{/if}}
3434
</div>
3535
{{else}}
3636
<div class="target-name">
37-
{{replace-emoji target.name}}
37+
{{replace-emoji this.target.name}}
3838
</div>
3939
<div class="target-group-name">
40-
{{target.group_name}}
40+
{{this.target.group_name}}
4141
</div>
4242
{{/if}}
4343
</div>
4444
<div class="controls">
45-
{{#if canMoveUp}}
46-
<DButton @icon="arrow-up" @action={{moveUp}} />
45+
{{#if this.canMoveUp}}
46+
<DButton @icon="arrow-up" @action={{this.moveUp}} />
4747
{{/if}}
4848

49-
{{#if canMoveDown}}
50-
<DButton @icon="arrow-down" @action={{moveDown}} />
49+
{{#if this.canMoveDown}}
50+
<DButton @icon="arrow-down" @action={{this.moveDown}} />
5151
{{/if}}
5252

53-
{{#if editing}}
53+
{{#if this.editing}}
5454
<DButton
5555
@icon="check"
5656
@title="discourse_teambuild.targets.save"
5757
@action={{action "save"}}
58-
@disabled={{saveDisabled}}
58+
@disabled={{this.saveDisabled}}
5959
class="btn-primary save"
6060
/>
6161

@@ -69,7 +69,7 @@
6969
<DButton
7070
@icon="pencil-alt"
7171
@title="discourse_teambuild.targets.edit"
72-
@action={{action (mut editSelected) true}}
72+
@action={{action (mut this.editSelected) true}}
7373
class="edit"
7474
/>
7575

assets/javascripts/discourse/templates/team-build-index.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#if scores}}
1+
{{#if this.scores}}
22
<table class="high-scores">
33
<thead>
44
<tr>
@@ -8,7 +8,7 @@
88
</tr>
99
</thead>
1010
<tbody>
11-
{{#each scores as |s|}}
11+
{{#each this.scores as |s|}}
1212
<tr class={{if s.me "me"}}>
1313
<td class="rank">
1414
{{s.rank}}

assets/javascripts/discourse/templates/team-build-manage.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<div class="teambuild-manage">
2-
{{#if targets}}
3-
{{#each sortedTargets as |target idx|}}
2+
{{#if this.targets}}
3+
{{#each this.sortedTargets as |target idx|}}
44
<TeambuildTarget
55
@target={{target}}
6-
@groups={{groups}}
6+
@groups={{this.groups}}
77
@index={{idx}}
8-
@length={{sortedTargets.length}}
8+
@length={{this.sortedTargets.length}}
99
@removeTarget={{action "removeTarget" target}}
1010
@moveUp={{action "move" idx -1}}
1111
@moveDown={{action "move" idx 1}}

assets/javascripts/discourse/templates/team-build-progress.hbs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
{{#if siteSettings.teambuild_description}}
1+
{{#if this.siteSettings.teambuild_description}}
22
<div class="teambuild-description">
3-
{{siteSettings.teambuild_description}}
3+
{{this.siteSettings.teambuild_description}}
44
</div>
55
{{/if}}
66

77
<div class="completed-score">
8-
<div class="username">@{{progress.user.username}}</div>
8+
<div class="username">@{{this.progress.user.username}}</div>
99
<div class="status">
1010
{{i18n "discourse_teambuild.progress.completed"}}:
11-
{{progress.completed.length}}
11+
{{this.progress.completed.length}}
1212
/
13-
{{progress.total}}
13+
{{this.progress.total}}
1414
</div>
1515
</div>
1616

1717
<div class="all-targets">
18-
{{#each progress.teambuild_targets as |target|}}
18+
{{#each this.progress.teambuild_targets as |target|}}
1919
<div class="target-type">
2020
{{#if target.group_id}}
2121
<div class="description">{{replace-emoji target.name}}</div>
2222
<div class="target-choices multi-choice">
2323
{{#each target.users as |u|}}
2424
<TeambuildChoice
2525
@label={{u.username}}
26-
@progress={{progress}}
26+
@progress={{this.progress}}
2727
@target={{target}}
2828
@userId={{u.id}}
29-
@readOnly={{readOnly}}
29+
@readOnly={{this.readOnly}}
3030
/>
3131
{{/each}}
3232
</div>
3333
{{else}}
3434
<TeambuildChoice
3535
@label={{replace-emoji target.name}}
36-
@progress={{progress}}
36+
@progress={{this.progress}}
3737
@target={{target}}
38-
@userId={{progress.user.id}}
39-
@readOnly={{readOnly}}
38+
@userId={{this.progress.user.id}}
39+
@readOnly={{this.readOnly}}
4040
/>
4141
{{/if}}
4242
</div>

assets/javascripts/discourse/templates/team-build.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="team-build">
2-
<h1>{{siteSettings.teambuild_name}}</h1>
2+
<h1>{{this.siteSettings.teambuild_name}}</h1>
33

44
<ul class="nav nav-pills">
55
<NavItem
@@ -10,7 +10,7 @@
1010
@route="teamBuild.progress"
1111
@label="discourse_teambuild.progress.title"
1212
/>
13-
{{#if currentUser.staff}}
13+
{{#if this.currentUser.staff}}
1414
<NavItem
1515
@route="teamBuild.manage"
1616
@label="discourse_teambuild.manage.title"

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"

0 commit comments

Comments
 (0)