Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove no-implicit-this lint error. #1258

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8b7da2b
fix(addon/components/paper-button): remove no-implicit-this.
matthewhartstonge Oct 3, 2024
8348ac6
fix(addon/components/paper-card-media): remove no-implicit-this.
matthewhartstonge Oct 3, 2024
dfecd7d
fix(addon/components/paper-card-title-media): remove no-implicit-this.
matthewhartstonge Oct 3, 2024
81c3bb8
fix(addon/components/paper-checkbox): remove no-implicit-this.
matthewhartstonge Oct 3, 2024
7c4fe93
fix(addon/components/paper-contact-chips): remove no-implicit-this.
matthewhartstonge Oct 3, 2024
dc58b63
fix(addon/components/paper-dialog): remove no-implicit-this.
matthewhartstonge Oct 3, 2024
746cba0
fix(addon/components/paper-form): remove no-implicit-this.
matthewhartstonge Oct 3, 2024
2c9bac0
fix(addon/components/paper-icon): remove no-implicit-this.
matthewhartstonge Oct 3, 2024
413ccba
fix(addon/components/paper-input): currentLength was not defined, the…
matthewhartstonge Oct 4, 2024
0947a41
fix(addon/components/paper-input): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
ddeea93
fix(addon/components/paper-item): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
4646ba0
fix(addon/components/paper-optgroup): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
e893112
fix(addon/components/paper-radio-base): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
f8113fe
fix(addon/components/paper-radio-group-label): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
21123f5
fix(addon/components/paper-radio-group): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
c3a485a
fix(addon/components/paper-progress-circular): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
73661cb
fix(addon/components/paper-progress-linear): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
6b46c8b
fix(addon/components/paper-sidenav): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
df6b56f
fix(addon/components/paper-sidenav-toggle): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
6b423be
fix(addon/components/paper-speed-dial-actions): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
538ef53
fix(addon/components/paper-switch): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
cd3394a
fix(addon/components/paper-tab): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
1330310
fix(addon/components/paper-tabs): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
4196dad
fix(addon/components/paper-toast): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
ae9fe34
fix(addon/components/paper-input): validationErrorMessages are includ…
matthewhartstonge Oct 4, 2024
cece902
fix(addon/components/paper-radio-group): toggle and disabled are prov…
matthewhartstonge Oct 4, 2024
2f07aaa
fix(addon/components/paper-input): disabled is provided via the Focus…
matthewhartstonge Oct 4, 2024
df75c0a
fix(addon/components/paper-toaster): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
542ec01
fix(addon/components/paper-tooltip): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
79d136e
fix(dummy/app/templates/components/doc-content): remove no-implicit-t…
matthewhartstonge Oct 4, 2024
326c442
fix(dummy/app/templates): remove no-implicit-this.
matthewhartstonge Oct 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addon/components/paper-button.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{! template-lint-disable no-curly-component-invocation no-implicit-this }}
{{! template-lint-disable no-curly-component-invocation }}
{{#if (has-block)}}
{{yield}}
{{else}}
{{label}}
{{@label}}
{{/if}}

<PaperRipple
Expand Down
5 changes: 2 additions & 3 deletions addon/components/paper-card-media.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{! template-lint-disable no-implicit-this }}
{{#if (has-block)}}
<div class="md-media-{{size}}">
<div class="md-media-{{this.size}}">
{{yield}}
</div>
{{else}}
<img class="md-media-{{size}}" src={{src}} alt={{alt}} title={{title}}>
<img class="md-media-{{this.size}}" src={{@src}} alt={{@alt}} title={{@title}}>
{{/if}}
5 changes: 2 additions & 3 deletions addon/components/paper-card-title-media.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{! template-lint-disable no-implicit-this }}
{{#if (has-block)}}
<div class="md-media-{{size}}">
<div class="md-media-{{this.size}}">
{{yield}}
</div>
{{else}}
<img class="md-media-{{size}}" src={{src}} alt={{alt}} title={{title}}>
<img class="md-media-{{this.size}}" src={{@src}} alt={{@alt}} title={{@title}}>
{{/if}}
8 changes: 4 additions & 4 deletions addon/components/paper-checkbox.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{! template-lint-disable no-curly-component-invocation no-implicit-this }}
{{! template-lint-disable no-curly-component-invocation }}
<div class="md-container">
<div class="md-icon"></div>
<PaperRipple
Expand All @@ -7,14 +7,14 @@
</div>
{{#if (has-block)}}
<div class="md-label">
<span id={{labelId}}>
<span id={{this.labelId}}>
{{yield}}
</span>
</div>
{{else}}
<div class="md-label">
<span id={{labelId}}>
{{label}}
<span id={{this.labelId}}>
{{@label}}
</span>
</div>
{{/if}}
5 changes: 2 additions & 3 deletions addon/components/paper-contact-chips/template.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{! template-lint-disable no-implicit-this }}
<md-contact-chips class="md-default-theme {{@class}}" ...attributes>
<PaperChips
class="md-contact-chips"
Expand All @@ -25,9 +24,9 @@

{{#if (eq type "chip")}}
<div class="md-contact-avatar">
<img src={{get item imageField}} alt={{get item nameField}}>
<img src={{get item this.imageField}} alt={{get item this.nameField}}>
</div>
<span class="md-contact-name">{{get item nameField}}</span>
<span class="md-contact-name">{{get item this.nameField}}</span>
{{/if}}

</PaperChips>
Expand Down
10 changes: 5 additions & 5 deletions addon/components/paper-dialog.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{! template-lint-disable no-action no-implicit-this }}
{{#in-element destinationEl insertBefore=null}}
<PaperBackdrop @locked-open={{isLockedOpen}} @opaque={{opaque}} @fixed={{unless parent true}} @class="md-dialog-backdrop" @onClick={{action "outsideClicked"}} />
<PaperDialogContainer @class={{readonly dialogContainerClass}} @outsideClicked={{action "outsideClicked"}}>
<PaperDialogInner @class={{readonly class}} @origin={{origin}} @defaultedParent={{defaultedParent}} @defaultedOpenFrom={{defaultedOpenFrom}} @defaultedCloseTo={{defaultedCloseTo}} @fullscreen={{fullscreen}} @focusOnOpen={{focusOnOpen}}>
{{! template-lint-disable no-action }}
{{#in-element this.destinationEl insertBefore=null}}
<PaperBackdrop @locked-open={{@isLockedOpen}} @opaque={{this.opaque}} @fixed={{unless @parent true}} @class="md-dialog-backdrop" @onClick={{action "outsideClicked"}} />
<PaperDialogContainer @class={{readonly @dialogContainerClass}} @outsideClicked={{action "outsideClicked"}}>
<PaperDialogInner @class={{readonly @class}} @origin={{@origin}} @defaultedParent={{this.defaultedParent}} @defaultedOpenFrom={{this.defaultedOpenFrom}} @defaultedCloseTo={{this.defaultedCloseTo}} @fullscreen={{@fullscreen}} @focusOnOpen={{this.focusOnOpen}}>
{{yield}}
</PaperDialogInner>
</PaperDialogContainer>
Expand Down
18 changes: 9 additions & 9 deletions addon/components/paper-form.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{{! template-lint-disable no-action no-implicit-this }}
{{! template-lint-disable no-action }}
{{yield (hash
isValid=isValid
isInvalid=isInvalid
isTouched=isTouched
isInvalidAndTouched=isInvalidAndTouched
input=(component inputComponent
isValid=this.isValid
isInvalid=this.isInvalid
isTouched=this.isTouched
isInvalidAndTouched=this.isInvalidAndTouched
input=(component this.inputComponent
parentComponent=this
onValidityChange=(action "localOnValidityChange")
)
submit-button=(component submitButtonComponent
submit-button=(component this.submitButtonComponent
type="submit"
)
select=(component selectComponent
select=(component this.selectComponent
parentComponent=this
onValidityChange=(action "localOnValidityChange")
)
autocomplete=(component autocompleteComponent
autocomplete=(component this.autocompleteComponent
parentComponent=this
onValidityChange=(action "localOnValidityChange")
)
Expand Down
3 changes: 1 addition & 2 deletions addon/components/paper-icon.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{{! template-lint-disable no-implicit-this }}
{{-paper-underscore iconClass}}
{{-paper-underscore this.iconClass}}
{{yield}}
170 changes: 85 additions & 85 deletions addon/components/paper-input.hbs
Original file line number Diff line number Diff line change
@@ -1,97 +1,97 @@
{{! template-lint-disable no-action no-curly-component-invocation no-down-event-binding no-implicit-this no-positive-tabindex }}
{{#if label}}
<label for={{inputElementId}} class={{if required "md-required"}}>{{label}}</label>
{{! template-lint-disable no-action no-curly-component-invocation no-down-event-binding no-positive-tabindex }}
{{#if @label}}
<label for={{this.inputElementId}} class={{if @required "md-required"}}>{{@label}}</label>
{{/if}}

{{#if icon}}
{{component iconComponent icon}}
{{#if @icon}}
{{component this.iconComponent @icon}}
{{/if}}

{{#if textarea}}
{{#if @textarea}}
<textarea
class="md-input {{if isInvalid "ng-invalid"}} {{if isTouched "ng-dirty"}}"
id={{inputElementId}}
placeholder={{if shouldAddPlaceholder placeholder}}
disabled={{disabled}}
autofocus={{autofocus}}
aria-describedby={{concat elementId "-char-count " elementId "-error-messages"}}
onfocus={{onFocus}}
class="md-input {{if this.isInvalid "ng-invalid"}} {{if this.isTouched "ng-dirty"}}"
id={{this.inputElementId}}
placeholder={{if this.shouldAddPlaceholder @placeholder}}
disabled={{this.disabled}}
autofocus={{this.autofocus}}
aria-describedby={{concat this.elementId "-char-count " this.elementId "-error-messages"}}
onfocus={{@onFocus}}
onblur={{action "handleBlur"}}
onkeydown={{onKeyDown}}
onkeyup={{onKeyUp}}
onclick={{onClick}}
onkeydown={{@onKeyDown}}
onkeyup={{@onKeyUp}}
onclick={{@onClick}}
oninput={{action "handleInput"}}

name={{passThru.name}}
rows={{passThru.rows}}
cols={{passThru.cols}}
maxlength={{passThru.maxlength}}
tabindex={{passThru.tabindex}}
title={{title}}
required={{passThru.required}}
selectionEnd={{passThru.selectionEnd}}
selectionStart={{passThru.selectionStart}}
selectionDirection={{passThru.selectionDirection}}
wrap={{passThru.wrap}}
readonly={{passThru.readonly}}
form={{passThru.form}}
spellcheck={{passThru.spellcheck}}></textarea>
name={{@passThru.name}}
rows={{@passThru.rows}}
cols={{@passThru.cols}}
maxlength={{@passThru.maxlength}}
tabindex={{@passThru.tabindex}}
title={{@title}}
required={{@passThru.required}}
selectionEnd={{@passThru.selectionEnd}}
selectionStart={{@passThru.selectionStart}}
selectionDirection={{@passThru.selectionDirection}}
wrap={{@passThru.wrap}}
readonly={{@passThru.readonly}}
form={{@passThru.form}}
spellcheck={{@passThru.spellcheck}}></textarea>
{{else}}
<input
class="md-input {{if isInvalid "ng-invalid"}} {{if isTouched "ng-dirty"}}"
id={{inputElementId}}
placeholder={{if shouldAddPlaceholder placeholder}}
type={{type}}
disabled={{disabled}}
autofocus={{autofocus}}
aria-describedby={{concat elementId "-char-count " elementId "-error-messages"}}
onfocus={{onFocus}}
class="md-input {{if this.isInvalid "ng-invalid"}} {{if this.isTouched "ng-dirty"}}"
id={{this.inputElementId}}
placeholder={{if this.shouldAddPlaceholder @placeholder}}
type={{this.type}}
disabled={{this.disabled}}
autofocus={{this.autofocus}}
aria-describedby={{concat this.elementId "-char-count " this.elementId "-error-messages"}}
onfocus={{@onFocus}}
onblur={{action "handleBlur"}}
onkeydown={{onKeyDown}}
onkeyup={{onKeyUp}}
onclick={{onClick}}
onkeydown={{@onKeyDown}}
onkeyup={{@onKeyUp}}
onclick={{@onClick}}
oninput={{action "handleInput"}}

accept={{passThru.accept}}
autocomplete={{passThru.autocomplete}}
autocorrect={{passThru.autocorrect}}
autocapitalize={{passThru.autocapitalize}}
autosave={{passThru.autosave}}
form={{passThru.form}}
formaction={{passThru.formaction}}
formenctype={{passThru.formenctype}}
formmethod={{passThru.formmethod}}
formnovalidate={{passThru.formnovalidate}}
formtarget={{passThru.formtarget}}
height={{passThru.height}}
inputmode={{passThru.inputmode}}
min={{passThru.min}}
maxlength={{passThru.maxlength}}
max={{passThru.max}}
multiple={{passThru.multiple}}
name={{passThru.name}}
pattern={{passThru.pattern}}
readonly={{passThru.readonly}}
required={{passThru.required}}
selectionDirection={{passThru.selectionDirection}}
size={{passThru.size}}
spellcheck={{passThru.spellcheck}}
step={{passThru.step}}
tabindex={{passThru.tabindex}}
title={{title}}
width={{passThru.width}}>
accept={{@passThru.accept}}
autocomplete={{@passThru.autocomplete}}
autocorrect={{@passThru.autocorrect}}
autocapitalize={{@passThru.autocapitalize}}
autosave={{@passThru.autosave}}
form={{@passThru.form}}
formaction={{@passThru.formaction}}
formenctype={{@passThru.formenctype}}
formmethod={{@passThru.formmethod}}
formnovalidate={{@passThru.formnovalidate}}
formtarget={{@passThru.formtarget}}
height={{@passThru.height}}
inputmode={{@passThru.inputmode}}
min={{@passThru.min}}
maxlength={{@passThru.maxlength}}
max={{@passThru.max}}
multiple={{@passThru.multiple}}
name={{@passThru.name}}
pattern={{@passThru.pattern}}
readonly={{@passThru.readonly}}
required={{@passThru.required}}
selectionDirection={{@passThru.selectionDirection}}
size={{@passThru.size}}
spellcheck={{@passThru.spellcheck}}
step={{@passThru.step}}
tabindex={{@passThru.tabindex}}
title={{@title}}
width={{@passThru.width}}>
{{/if}}

{{#unless hideAllMessages}}
<div class="md-errors-spacer" id={{concat elementId "-char-count"}}>
{{#if maxlength}}
<div class="md-char-counter">{{renderCharCount}}</div>
{{#unless this.hideAllMessages}}
<div class="md-errors-spacer" id={{concat this.elementId "-char-count"}}>
{{#if @maxlength}}
<div class="md-char-counter">{{this.currentLength}}/{{@maxlength}}</div>
{{/if}}
</div>
{{#if isInvalidAndTouched}}
<div class="md-input-messages-animation md-auto-hide" id={{concat elementId "-error-messages"}}>
{{#each validationErrorMessages as |error index|}}
<div id="error-{{inputElementId}}-{{index}}"
{{#if this.isInvalidAndTouched}}
<div class="md-input-messages-animation md-auto-hide" id={{concat this.elementId "-error-messages"}}>
{{#each this.validationErrorMessages as |error index|}}
<div id="error-{{this.inputElementId}}-{{index}}"
class="paper-input-error ng-enter ng-enter-active md-input-message-animation"
style="opacity: 1; margin-top: 0">
{{error.message}}
Expand All @@ -102,14 +102,14 @@
{{/unless}}

{{yield (hash
charCount=currentLength
isInvalid=isInvalid
isTouched=isTouched
isInvalidAndTouched=isInvalidAndTouched
hasValue=hasValue
validationErrorMessages=validationErrorMessages
charCount=this.currentLength
isInvalid=this.isInvalid
isTouched=this.isTouched
isInvalidAndTouched=this.isInvalidAndTouched
hasValue=this.hasValue
validationErrorMessages=this.validationErrorMessages
)}}

{{#if iconRight}}
{{component iconComponent iconRight}}
{{#if @iconRight}}
{{component this.iconComponent @iconRight}}
{{/if}}
5 changes: 2 additions & 3 deletions addon/components/paper-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ export default Component.extend(
},
}),

renderCharCount: computed('value', function () {
let currentLength = this.value ? this.value.length : 0;
return `${currentLength}/${this.maxlength}`;
currentLength: computed('value', function () {
return this.value ? this.value.length : 0;
}),

hasLeftIcon: bool('icon'),
Expand Down
6 changes: 3 additions & 3 deletions addon/components/paper-item.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{! template-lint-disable no-action no-implicit-this }}
{{! template-lint-disable no-action }}
{{#with (hash
checkbox=(component "paper-checkbox" parentComponent=this bubbles=false shouldRegister=true)
button=(component "paper-button" parentComponent=this bubbles=false shouldRegister=true skipProxy=true)
switch=(component "paper-switch" parentComponent=this bubbles=false shouldRegister=true)
radio=(component "paper-radio-proxiable" parentComponent=this bubbles=false shouldRegister=true)
) as |controls|}}

{{#if hasPrimaryAction}}
{{#if this.hasPrimaryAction}}
<div class="md-button md-no-style">
<PaperButton @class="md-no-style" @onClick={{onClick}} @href={{href}} @target={{target}} @onMouseEnter={{action this.handleMouseEnter}} @onMouseLeave={{action this.handleMouseLeave}} />
<PaperButton @class="md-no-style" @onClick={{@onClick}} @href={{@href}} @target={{@target}} @onMouseEnter={{action this.handleMouseEnter}} @onMouseLeave={{action this.handleMouseLeave}} />
<div class="md-list-item-inner">
{{yield controls}}
</div>
Expand Down
4 changes: 2 additions & 2 deletions addon/components/paper-optgroup.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{! template-lint-disable no-curly-component-invocation no-implicit-this }}
<label>{{label}}</label>
{{! template-lint-disable no-curly-component-invocation }}
<label>{{@label}}</label>
{{yield}}
5 changes: 2 additions & 3 deletions addon/components/paper-progress-circular.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{! template-lint-disable no-implicit-this }}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {{diameter}} {{diameter}}" style={{svgStyle}}>
<path fill="none" style={{pathStyle}} stroke-dasharray={{strokeDasharray}} d={{d}}></path>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {{this.diameter}} {{this.diameter}}" style={{this.svgStyle}}>
<path fill="none" style={{this.pathStyle}} stroke-dasharray={{this.strokeDasharray}} d={{this.d}}></path>
</svg>
7 changes: 3 additions & 4 deletions addon/components/paper-progress-linear.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{! template-lint-disable no-implicit-this }}
<div class="md-container {{queryModeClass}}">
<div class="md-container {{this.queryModeClass}}">
<div class="md-dashed"></div>
<div class="md-bar md-bar1" style={{bar1Style}}></div>
<div class="md-bar md-bar2" style={{bar2Style}}></div>
<div class="md-bar md-bar1" style={{this.bar1Style}}></div>
<div class="md-bar md-bar2" style={{this.bar2Style}}></div>
</div>
4 changes: 2 additions & 2 deletions addon/components/paper-radio-base.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{! template-lint-disable no-curly-component-invocation no-implicit-this }}
{{! template-lint-disable no-curly-component-invocation }}
<div class="md-container">
<div class="md-off"></div>
<div class="md-on"></div>
Expand All @@ -15,7 +15,7 @@
{{else}}
<div class="md-label">
<span>
{{label}}
{{@label}}
</span>
</div>
{{/if}}
Loading
Loading