Skip to content

Commit 4be7de2

Browse files
committed
Lint fixes
1 parent f919af1 commit 4be7de2

File tree

24 files changed

+123
-88
lines changed

24 files changed

+123
-88
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"build": "ember build --environment=production",
2020
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
2121
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
22+
"lint:hbs": "ember-template-lint .",
2223
"lint:hbs:fix": "ember-template-lint . --fix",
2324
"lint:js": "eslint . --cache",
2425
"release": "release-it",
@@ -68,10 +69,11 @@
6869
"ember-page-title": "^8.0.0",
6970
"ember-qunit": "^5.1.5",
7071
"ember-resolver": "^11.0.1",
72+
"ember-set-helper": "^2.0.1",
7173
"ember-simulant-test-helpers": "^0.3.2",
7274
"ember-source": "~3.28.8",
7375
"ember-source-channel-url": "^3.0.0",
74-
"ember-template-lint": "^5.11.2",
76+
"ember-template-lint": "^5.13.0",
7577
"ember-try": "^3.0.0",
7678
"eslint": "^7.32.0",
7779
"eslint-config-prettier": "^9.0.0",

tests/dummy/app/components/clickable-pane/template.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<div class="ClickablePane" onclick={{action (mut this.clicked) true}}>
1+
{{!-- template-lint-disable no-invalid-interactive --}}
2+
<div class="ClickablePane" onclick={{set this 'clicked' true}}>
23
{{#if this.clicked}}
34
clicked
45
{{else}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{!-- template-lint-disable no-route-action --}}
12
<div ...attributes>
2-
<button {{action (route-action 'back')}} class="y-button left-button theme-color back-button">Close</button>
3+
<button class="y-button left-button theme-color back-button" type="button" {{on 'click' (route-action 'back')}}>Close</button>
34
</div>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<div ...attributes>
22
<h1>My Schedule</h1>
3-
<a href="#" {{action (route-action 'drillDownToScheduleItem') '2'}}>Schedule Item 2</a>
3+
{{!-- template-lint-disable no-route-action --}}
4+
<a href="#" {{on 'click' (route-action 'drillDownToScheduleItem' '2')}}>Schedule Item 2</a>
45
</div>

tests/dummy/app/components/routable-components/page/header/template.hbs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
{{!-- template-lint-disable no-route-action --}}
12
<div class={{@class}}>
23

34
{{#if @model.isUnderMorePage~}}
4-
<button {{action (route-action 'back')}} class="y-button left-button theme-color back-button">Back</button>
5+
<button class="y-button left-button theme-color back-button" type="button" {{on 'click' (route-action 'back')}}>Back</button>
56
{{/if~}}
67

78
{{#if @model.hasMySchedule}}
8-
<button {{action (route-action 'visitMySchedule')}} class="y-button right-button theme-color icon-button my-schedule-button js-myScheduleButton"></button>
9+
<button class="y-button right-button theme-color icon-button my-schedule-button js-myScheduleButton" type="button" {{on 'click' (route-action 'visitMySchedule')}}></button>
910
{{/if~}}
1011

1112
<div class="page-title">{{@model.pageTitle}}</div>

tests/dummy/app/components/routable-components/schedule-item/header/template.hbs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
{{!-- template-lint-disable no-route-action --}}
12
<div class={{@class}}>
2-
<button {{action (route-action 'back')}} class="y-button left-button theme-color back-button">Back</button>
3+
<button class="y-button left-button theme-color back-button" type="button" {{on 'click' (route-action 'back')}}>Back</button>
34

45
{{#if @model.yapp.myScheduleEnabled}}
5-
<button {{action (route-action 'visitMySchedule')}} class="y-button right-button theme-color icon-button my-schedule-button"></button>
6+
<button class="y-button right-button theme-color icon-button my-schedule-button" type="button" {{on 'click' (route-action 'visitMySchedule')}}></button>
67
{{/if}}
78

89
<div class="page-title">Schedule Item</div>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{!-- template-lint-disable no-route-action --}}
12
<div class={{@class}}>
2-
<button {{action (route-action 'back')}} class="y-button left-button theme-color back-button">Close</button>
3+
<button class="y-button left-button theme-color back-button" type="button" {{on 'click' (route-action 'back')}}>Close</button>
34
</div>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
{{!-- template-lint-disable no-route-action --}}
12
<div class={{@class}}>
2-
<button {{action (route-action 'back')}} class="y-button left-button theme-color back-button">Back</button>
3+
<button class="y-button left-button theme-color back-button" type="button" {{on 'click' (route-action 'back')}}>Back</button>
34
<div class="page-title">Feedback</div>
45
</div>

tests/dummy/app/components/routable-components/schedule-item/template.hbs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
{{!-- template-lint-disable no-route-action no-inline-styles require-input-label --}}
12
<div ...attributes>
23
<div class='y-page-content' style="position:absolute;top:0;bottom:0;left:0;right:0">
34
<h1>schedule-item {{@model.slug}}</h1>
4-
<button {{action (route-action 'drillDownToRatingForm')}}>Rate</button>
5-
<button {{action (route-action 'logThenGoToRating')}}>Log Then Rate</button>
6-
<button {{action (route-action 'showAttachedPerson')}}>John Doe</button>
5+
<button type="button" {{on 'click' (route-action 'drillDownToRatingForm')}}>Rate</button>
6+
<button type="button" {{on 'click' (route-action 'logThenGoToRating')}}>Log Then Rate</button>
7+
<button type="button" {{on 'click' (route-action 'showAttachedPerson')}}>John Doe</button>
78
<textarea rows="8" cols="40" style="border-style: inset;"></textarea>
89
<VerticalPanDetectorPane>
910
<ClickablePane />
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
{{!-- template-lint-disable no-route-action --}}
12
<div class={{@class}}>
23
<div class="page-title">{{@model.pageTitle}}</div>
34

4-
<button {{action (route-action 'back')}} class="y-button left-button theme-color back-button">Back</button>
5+
<button class="y-button left-button theme-color back-button" type="button" {{on 'click' (route-action 'back')}}>Back</button>
56

67
{{#if @model.hasMySchedule}}
7-
<button {{action (route-action 'visitMySchedule')}} class="y-button right-button theme-color icon-button my-schedule-button js-myScheduleButton"></button>
8+
<button class="y-button right-button theme-color icon-button my-schedule-button js-myScheduleButton" type="button" {{on 'click' (route-action 'visitMySchedule')}}></button>
89
{{/if~}}
910
</div>

0 commit comments

Comments
 (0)