Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 119d331

Browse files
DEV: Update linting (#227)
1 parent e28f97a commit 119d331

File tree

17 files changed

+308
-319
lines changed

17 files changed

+308
-319
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<label for={{name}}>{{title}}</label>
1+
<label for={{this.name}}>{{this.title}}</label>
22
{{house-ads-chooser
3-
settingValue=adValue
4-
choices=adNames
5-
onChange=(action (mut adValue))
3+
settingValue=this.adValue
4+
choices=this.adNames
5+
onChange=(action (mut this.adValue))
66
}}
77
<div class="setting-controls">
8-
{{#if changed}}
8+
{{#if this.changed}}
99
<DButton class="ok" @action={{action "save"}} @icon="check" />
1010
<DButton class="cancel" @action={{action "cancel"}} @icon="times" />
1111
{{/if}}
1212
</div>
13-
<p class="help">{{help}}</p>
13+
<p class="help">{{this.help}}</p>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<label for={{name}}>{{title}}</label>
2-
<TextField @value={{adValue}} @classNames="house-ads-text-input" />
1+
<label for={{this.name}}>{{this.title}}</label>
2+
<TextField @value={{this.adValue}} @classNames="house-ads-text-input" />
33
<div class="setting-controls">
4-
{{#if changed}}
4+
{{#if this.changed}}
55
<DButton class="ok" @action={{action "save"}} @icon="check" />
66
<DButton class="cancel" @action={{action "cancel"}} @icon="times" />
77
{{/if}}
88
</div>
9-
<p class="help">{{help}}</p>
9+
<p class="help">{{this.help}}</p>

admin/assets/javascripts/discourse/templates/admin/plugins-house-ads-index.hbs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
<section class="house-ads-settings content-body">
22
<div>{{i18n "admin.adplugin.house_ads.description"}}</div>
33

4-
{{#if houseAds.length}}
4+
{{#if this.houseAds.length}}
55
<form class="form-horizontal">
66
{{house-ads-list-setting
77
name="topic_list_top"
8-
value=adSettings.topic_list_top
9-
allAds=houseAds
10-
adSettings=adSettings
8+
value=this.adSettings.topic_list_top
9+
allAds=this.houseAds
10+
adSettings=this.adSettings
1111
}}
1212
{{house-ads-list-setting
1313
name="topic_above_post_stream"
14-
value=adSettings.topic_above_post_stream
15-
allAds=houseAds
16-
adSettings=adSettings
14+
value=this.adSettings.topic_above_post_stream
15+
allAds=this.houseAds
16+
adSettings=this.adSettings
1717
}}
1818
{{house-ads-list-setting
1919
name="topic_above_suggested"
20-
value=adSettings.topic_above_suggested
21-
allAds=houseAds
22-
adSettings=adSettings
20+
value=this.adSettings.topic_above_suggested
21+
allAds=this.houseAds
22+
adSettings=this.adSettings
2323
}}
2424
{{house-ads-list-setting
2525
name="post_bottom"
26-
value=adSettings.post_bottom
27-
allAds=houseAds
28-
adSettings=adSettings
26+
value=this.adSettings.post_bottom
27+
allAds=this.houseAds
28+
adSettings=this.adSettings
2929
}}
3030
{{house-ads-list-setting
3131
name="topic_list_between"
32-
value=adSettings.topic_list_between
33-
allAds=houseAds
34-
adSettings=adSettings
32+
value=this.adSettings.topic_list_between
33+
allAds=this.houseAds
34+
adSettings=this.adSettings
3535
}}
3636

3737
<DButton

admin/assets/javascripts/discourse/templates/admin/plugins-house-ads.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="adplugin-mgmt">
22
<h1>{{i18n "admin.adplugin.house_ads.title"}}</h1>
3-
{{#if model.length}}
3+
{{#if this.model.length}}
44
<div class="content-list">
55
<div class="house-ads-actions">
66
<LinkTo
@@ -17,7 +17,7 @@
1717
</LinkTo>
1818
</div>
1919
<ul class="house-ads-list">
20-
{{#each model as |ad|}}
20+
{{#each this.model as |ad|}}
2121
<li class="house-ads-list-item">
2222
{{#link-to route="adminPlugins.houseAds.show" model=ad.id}}
2323
{{ad.name}}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
{{#each adComponents as |adComponent|}}
1+
{{#each this.adComponents as |adComponent|}}
22
{{! Trick to force full destroy/re-render of component when route changes }}
33
{{#each (array this.router.currentRoute)}}
44
{{component
55
adComponent
6-
placement=placement
7-
category=category
8-
postNumber=postNumber
9-
indexNumber=indexNumber
10-
tagName=childTagName
6+
placement=this.placement
7+
category=this.category
8+
postNumber=this.postNumber
9+
indexNumber=this.indexNumber
10+
tagName=this.childTagName
1111
}}
1212
{{/each}}
1313
{{/each}}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{{#if showAd}}
2-
<div id={{divId}} class={{className}}></div>
1+
{{#if this.showAd}}
2+
<div id={{this.divId}} class={{this.className}}></div>
33
{{/if}}

assets/javascripts/discourse/components/amazon-product-links.hbs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
{{#if showAd}}
2-
{{#if site.mobileView}}
3-
<div class="amazon-product-links-label" style={{adTitleStyleMobile}}><h2
4-
>{{i18n "adplugin.advertisement_label"}}</h2></div>
1+
{{#if this.showAd}}
2+
{{#if this.site.mobileView}}
3+
<div
4+
class="amazon-product-links-label"
5+
style={{this.adTitleStyleMobile}}
6+
><h2>{{i18n "adplugin.advertisement_label"}}</h2></div>
57
<iframe
6-
style={{adWrapperStyleMobile}}
8+
style={{this.adWrapperStyleMobile}}
79
marginwidth="0"
810
marginheight="0"
911
scrolling="no"
1012
frameborder="0"
11-
src={{userInputMobile}}
13+
src={{this.userInputMobile}}
1214
title={{i18n "adplugin.advertisement_label"}}
1315
>
1416
</iframe>
@@ -18,12 +20,12 @@
1820
}}</h2></div>
1921
<div class="container" align="center">
2022
<iframe
21-
style={{adWrapperStyle}}
23+
style={{this.adWrapperStyle}}
2224
marginwidth="0"
2325
marginheight="0"
2426
scrolling="no"
2527
frameborder="0"
26-
src={{userInput}}
28+
src={{this.userInput}}
2729
title={{i18n "adplugin.advertisement_label"}}
2830
>
2931
</iframe>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{{#if showAd}}
1+
{{#if this.showAd}}
22
{{! template-lint-disable no-forbidden-elements }}
3-
<script src={{url}} id="_carbonads_js" async type="text/javascript">
3+
<script src={{this.url}} id="_carbonads_js" async type="text/javascript">
44
</script>
55
{{/if}}

assets/javascripts/discourse/components/google-adsense.hbs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
{{#if showAd}}
1+
{{#if this.showAd}}
22
<div class="google-adsense-label"><h2>{{i18n
33
"adplugin.advertisement_label"
44
}}</h2></div>
55
<div
66
class="google-adsense-content"
7-
id={{if isResponsive "google-adsense__responsive"}}
8-
style={{adWrapperStyle}}
7+
id={{if this.isResponsive "google-adsense__responsive"}}
8+
style={{this.adWrapperStyle}}
99
>
1010
<ins
1111
class="adsbygoogle"
12-
style={{adInsStyle}}
13-
data-ad-client="ca-pub-{{publisher_id}}"
14-
data-ad-slot={{ad_code}}
15-
data-ad-format={{autoAdFormat}}
12+
style={{this.adInsStyle}}
13+
data-ad-client="ca-pub-{{this.publisher_id}}"
14+
data-ad-slot={{this.ad_code}}
15+
data-ad-format={{this.autoAdFormat}}
1616
>
1717
</ins>
1818
</div>

assets/javascripts/discourse/components/google-dfp-ad.hbs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
{{#if showAd}}
2-
{{#if site.mobileView}}
3-
<div class="google-dfp-ad-label" style={{adTitleStyleMobile}}><h2>{{i18n
4-
"adplugin.advertisement_label"
5-
}}</h2></div>
1+
{{#if this.showAd}}
2+
{{#if this.site.mobileView}}
3+
<div class="google-dfp-ad-label" style={{this.adTitleStyleMobile}}><h2
4+
>{{i18n "adplugin.advertisement_label"}}</h2></div>
65
<div
7-
id={{divId}}
8-
style={{adWrapperStyle}}
6+
id={{this.divId}}
7+
style={{this.adWrapperStyle}}
98
class="dfp-ad-unit"
109
align="center"
1110
></div>
@@ -14,8 +13,8 @@
1413
"adplugin.advertisement_label"
1514
}}</h2></div>
1615
<div
17-
id={{divId}}
18-
style={{adWrapperStyle}}
16+
id={{this.divId}}
17+
style={{this.adWrapperStyle}}
1918
class="dfp-ad-unit"
2019
align="center"
2120
></div>

0 commit comments

Comments
 (0)