Skip to content

Commit 6cc3e28

Browse files
committed
fix lints that lttf couldn't auto ignore
1 parent f00dcdf commit 6cc3e28

File tree

6 files changed

+51
-41
lines changed

6 files changed

+51
-41
lines changed

.template-lintrc.js

+10
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,14 @@
33

44
module.exports = {
55
extends: 'recommended',
6+
overrides: [
7+
{
8+
files: ['tests/**/*'],
9+
rules: {
10+
'no-potential-path-strings': false,
11+
'no-curly-component-invocation': false,
12+
'no-action': false,
13+
},
14+
},
15+
],
616
};

prember-urls.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/* eslint-disable no-undef, node/no-extraneous-require, prettier/prettier */
1+
/* eslint-disable no-undef, prettier/prettier */
22
const { readdirSync, existsSync } = require('fs');
33
const cmp = require('semver-compare');
4-
// eslint-disable-next-line node/no-extraneous-require
4+
55
const semver = require('semver');
66

77
function partialUrlEncode(input) {

tests/integration/components/api-index-filter-test.js

+20-20
Original file line numberDiff line numberDiff line change
@@ -98,29 +98,29 @@ module('Integration | Component | api index filter', function (hooks) {
9898
Inherited
9999
</label>
100100
<label class="access-checkbox">
101-
<input id=\"protected-toggle\"
102-
type=\"checkbox\"
101+
<input id="protected-toggle"
102+
type="checkbox"
103103
checked={{this.filterData.showProtected}}
104104
onchange={{action "updateFilter" "showProtected"}}>
105105
Protected
106106
</label>
107107
<label class="access-checkbox">
108-
<input id=\"private-toggle\"
109-
type=\"checkbox\"
108+
<input id="private-toggle"
109+
type="checkbox"
110110
checked={{this.sectionData.showPrivate}}
111111
onchange={{action "updateFilter" "showPrivate"}}>
112112
Private
113113
</label>
114114
<label class="access-checkbox">
115-
<input id=\"deprecated-toggle\"
116-
type=\"checkbox\"
115+
<input id="deprecated-toggle"
116+
type="checkbox"
117117
checked={{this.sectionData.showDeprecated}}
118118
onchange={{action "updateFilter" "showDeprecated"}}>
119119
</label>
120120
</section>
121121
<h2>Methods</h2>
122122
{{#each myModel.methods as |method|}}
123-
<p class=\"method-name\">{{method.name}}</p>
123+
<p class="method-name">{{method.name}}</p>
124124
{{/each}}
125125
{{/api-index-filter}}
126126
`);
@@ -163,8 +163,8 @@ module('Integration | Component | api index filter', function (hooks) {
163163
Inherited
164164
</label>
165165
<label class="access-checkbox">
166-
<input id=\"protected-toggle\"
167-
type=\"checkbox\"
166+
<input id="protected-toggle"
167+
type="checkbox"
168168
checked={{this.filterData.showProtected}}
169169
onchange={{action "updateFilter" "showProtected"}}>
170170
Protected
@@ -177,15 +177,15 @@ module('Integration | Component | api index filter', function (hooks) {
177177
Private
178178
</label>
179179
<label class="access-checkbox">
180-
<input id=\"deprecated-toggle\"
181-
type=\"checkbox\"
180+
<input id="deprecated-toggle"
181+
type="checkbox"
182182
checked={{this.sectionData.showDeprecated}}
183183
onchange={{action "updateFilter" "showDeprecated"}}>
184184
</label>
185185
</section>
186186
<h2>Methods</h2>
187187
{{#each myModel.methods as |method|}}
188-
<p class=\"method-name\">{{method.name}}</p>
188+
<p class="method-name">{{method.name}}</p>
189189
{{/each}}
190190
{{/api-index-filter}}
191191
`);
@@ -228,8 +228,8 @@ module('Integration | Component | api index filter', function (hooks) {
228228
Inherited
229229
</label>
230230
<label class="access-checkbox">
231-
<input id=\"protected-toggle\"
232-
type=\"checkbox\"
231+
<input id="protected-toggle"
232+
type="checkbox"
233233
checked={{this.filterData.showProtected}}
234234
onchange={{action "updateFilter" "showProtected"}}>
235235
Protected
@@ -242,15 +242,15 @@ module('Integration | Component | api index filter', function (hooks) {
242242
Private
243243
</label>
244244
<label class="access-checkbox">
245-
<input id=\"deprecated-toggle\"
246-
type=\"checkbox\"
245+
<input id="deprecated-toggle"
246+
type="checkbox"
247247
checked={{this.sectionData.showDeprecated}}
248248
onchange={{action "updateFilter" "showDeprecated"}}>
249249
</label>
250250
</section>
251251
<h2>Methods</h2>
252252
{{#each myModel.methods as |method|}}
253-
<p class=\"method-name\">{{method.name}}</p>
253+
<p class="method-name">{{method.name}}</p>
254254
{{/each}}
255255
{{/api-index-filter}}
256256
`);
@@ -319,7 +319,7 @@ module('Integration | Component | api index filter', function (hooks) {
319319
</section>
320320
<h2>Methods</h2>
321321
{{#each myModel.methods as |method|}}
322-
<p class=\"method-name\">{{method.name}}</p>
322+
<p class="method-name">{{method.name}}</p>
323323
{{/each}}
324324
{{/api-index-filter}}
325325
`);
@@ -396,7 +396,7 @@ module('Integration | Component | api index filter', function (hooks) {
396396
</section>
397397
<h2>Methods</h2>
398398
{{#each myModel.methods as |method|}}
399-
<p class=\"method-name\">{{method.name}}</p>
399+
<p class="method-name">{{method.name}}</p>
400400
{{/each}}
401401
{{/api-index-filter}}
402402
`);
@@ -448,7 +448,7 @@ module('Integration | Component | api index filter', function (hooks) {
448448
{{#api-index-filter model=this.model filterData=this.filterData as |myModel|}}
449449
<h2>Methods</h2>
450450
{{#each myModel.methods as |method|}}
451-
<p class=\"method-name\">{{method.name}}</p>
451+
<p class="method-name">{{method.name}}</p>
452452
{{/each}}
453453
{{/api-index-filter}}
454454
`);

tests/integration/components/api-index-test.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ module('Integration | Component | api index', function (hooks) {
4747
await render(hbs`
4848
{{#api-index itemData=this.myModel as |sectionData|}}
4949
{{#each sectionData.sections as |section|}}
50-
<h2 class=\"api-index-section-title\">{{section.title}}</h2>
50+
<h2 class="api-index-section-title">{{section.title}}</h2>
5151
{{#if section.items}}
5252
<ul class={{section.class}}>
5353
{{#each section.items as |item|}}
5454
<li>
5555
<LinkTo
56-
@route=\"item.route\"
56+
@route={{item.route}}
5757
@models={{array
5858
sectionData.projectId
5959
sectionData.projectVersion
@@ -125,13 +125,13 @@ module('Integration | Component | api index', function (hooks) {
125125
await render(hbs`
126126
{{#api-index itemData=this.myModel as |sectionData|}}
127127
{{#each sectionData.sections as |section|}}
128-
<h2 class=\"api-index-section-title\">{{section.title}}</h2>
128+
<h2 class="api-index-section-title">{{section.title}}</h2>
129129
{{#if section.items}}
130130
<ul class={{section.class}}>
131131
{{#each section.items as |item|}}
132132
<li>
133133
<LinkTo
134-
@route=\"item.route\"
134+
@route={{item.route}}
135135
@models={{array
136136
sectionData.projectId
137137
sectionData.projectVersion
@@ -248,8 +248,8 @@ module('Integration | Component | api index', function (hooks) {
248248
Inherited
249249
</label>
250250
<label class="access-checkbox">
251-
<input id=\"protected-toggle\"
252-
type=\"checkbox\"
251+
<input id="protected-toggle"
252+
type="checkbox"
253253
checked={{this.filterData.showProtected}}
254254
onchange={{action "updateFilter" "showProtected"}}>
255255
Protected
@@ -262,22 +262,22 @@ module('Integration | Component | api index', function (hooks) {
262262
Private
263263
</label>
264264
<label class="access-checkbox">
265-
<input id=\"deprecated-toggle\"
266-
type=\"checkbox\"
265+
<input id="deprecated-toggle"
266+
type="checkbox"
267267
checked={{this.filterData.showDeprecated}}
268268
onchange={{action "updateFilter" "showDeprecated"}}>
269269
</label>
270270
</section>
271271
272272
{{#api-index itemData=filteredModel as |sectionData|}}
273273
{{#each sectionData.sections as |section|}}
274-
<h2 class=\"api-index-section-title\">{{section.title}}</h2>
274+
<h2 class="api-index-section-title">{{section.title}}</h2>
275275
{{#if section.items}}
276276
<ul class={{section.class}}>
277277
{{#each section.items as |item|}}
278278
<li>
279279
<LinkTo
280-
@route=\"item.route\"
280+
@route={{item.route}}
281281
@models={{array
282282
sectionData.projectId
283283
sectionData.projectVersion
@@ -394,8 +394,8 @@ module('Integration | Component | api index', function (hooks) {
394394
Inherited
395395
</label>
396396
<label class="access-checkbox">
397-
<input id=\"protected-toggle\"
398-
type=\"checkbox\"
397+
<input id="protected-toggle"
398+
type="checkbox"
399399
checked={{this.filterData.showProtected}}
400400
onchange={{action "updateFilter" "showProtected"}}>
401401
Protected
@@ -409,22 +409,22 @@ module('Integration | Component | api index', function (hooks) {
409409
</label>
410410
{{! TODO: investigate this 'checked=': it looks wrong!}}
411411
<label class="access-checkbox">
412-
<input id=\"deprecated-toggle\"
413-
type=\"checkbox\"
412+
<input id="deprecated-toggle"
413+
type="checkbox"
414414
checked={{this.sectionData.showDeprecated}}
415415
onchange={{action "updateFilter" "showDeprecated"}}>
416416
</label>
417417
</section>
418418
419419
{{#api-index itemData=filteredModel as |sectionData|}}
420420
{{#each sectionData.sections as |section|}}
421-
<h2 class=\"api-index-section-title\">{{section.title}}</h2>
421+
<h2 class="api-index-section-title">{{section.title}}</h2>
422422
{{#if section.items}}
423423
<ul class={{section.class}}>
424424
{{#each section.items as |item|}}
425425
<li>
426426
<LinkTo
427-
@route=\"item.route\"
427+
@route={{item.route}}
428428
@models={{array
429429
sectionData.projectId
430430
sectionData.projectVersion

tests/integration/helpers/better-get-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module('helper:better-get', function (hooks) {
1313
this.set('dataStructure', obj);
1414
this.set('key', 'Ember.Object');
1515

16-
await render(hbs`{{better-get dataStructure key}}`);
16+
await render(hbs`{{better-get this.dataStructure this.key}}`);
1717

1818
assert.dom(this.element).hasText('hello');
1919
});
@@ -25,7 +25,7 @@ module('helper:better-get', function (hooks) {
2525
this.set('dataStructure', obj);
2626
this.set('key', '@ember/object');
2727

28-
await render(hbs`{{better-get dataStructure key}}`);
28+
await render(hbs`{{better-get this.dataStructure this.key}}`);
2929

3030
assert.dom(this.element).hasText('hello');
3131
});

tests/integration/helpers/function-heading-id-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module('helper:function-heading-id', function (hooks) {
99
test('should transform nested package to id', async function (assert) {
1010
this.set('inputValue', '@ember/object/computed');
1111

12-
await render(hbs`{{function-heading-id inputValue}}`);
12+
await render(hbs`{{function-heading-id this.inputValue}}`);
1313

1414
assert.dom(this.element).hasText('functions-computed');
1515
});

0 commit comments

Comments
 (0)