No implicit this codemod (#17235)

* Run no-implicit-this codemod for app templates
* Run tagless-ember-components-codemod for plugins
* Turn on no-implicit-this lint
This commit is contained in:
Peter Wagenet
2022-07-05 10:41:31 -07:00
committed by GitHub
parent fbc1bc4255
commit 371bbadb92
635 changed files with 4626 additions and 4634 deletions
@@ -1,6 +1,6 @@
<span class="email">{{user.email}}</span>
<span class="role">{{roleName}}</span>
<span class="email">{{this.user.email}}</span>
<span class="role">{{this.roleName}}</span>
<button type="button" class="wizard-btn small danger remove-user" {{action removeUser user}}>
<button type="button" class="wizard-btn small danger remove-user" {{action this.removeUser this.user}}>
{{d-icon "times"}}
</button>
@@ -1,18 +1,18 @@
{{#if users}}
{{#if this.users}}
<div class="users-list">
{{#each users as |user|}}
<InviteListUser @user={{user}} @roles={{roles}} @removeUser={{action "removeUser"}} />
{{#each this.users as |user|}}
<InviteListUser @user={{user}} @roles={{this.roles}} @removeUser={{action "removeUser"}} />
{{/each}}
</div>
{{/if}}
<div class="new-user">
<div class="text-field {{if invalid "invalid"}}">
<Input class="invite-email wizard-focusable" @value={{inviteEmail}} placeholder="user@example.com" @tabindex="9" />
<div class="text-field {{if this.invalid "invalid"}}">
<Input class="invite-email wizard-focusable" @value={{this.inviteEmail}} placeholder="user@example.com" @tabindex="9" />
</div>
<ComboBox @value={{inviteRole}} @content={{roles}} @nameProperty="label" @onChange={{action (mut inviteRole)}} />
<ComboBox @value={{this.inviteRole}} @content={{this.roles}} @nameProperty="label" @onChange={{action (mut this.inviteRole)}} />
<button type="button" class="wizard-btn small add-user" {{action "addUser"}}>
{{d-icon "plus"}}{{i18n "wizard.invites.add_user"}}
@@ -1,5 +1,5 @@
{{#if showStaffCount}}
{{#if this.showStaffCount}}
<div class="staff-count">
{{i18n "wizard.staff_count" count=field.value}}
{{i18n "wizard.staff_count" count=this.field.value}}
</div>
{{/if}}
@@ -1,18 +1,18 @@
<div class="previews {{if draggingActive "dragging"}}">
<div class="previews {{if this.draggingActive "dragging"}}">
<div class="preview-area topic-preview">
<canvas width={{elementWidth}} height={{elementHeight}} style={{canvasStyle}}>
<canvas width={{this.elementWidth}} height={{this.elementHeight}} style={{this.canvasStyle}}>
</canvas>
</div>
<div class="preview-area homepage-preview">
<HomepagePreview @wizard={{wizard}} @step={{step}} />
<HomepagePreview @wizard={{this.wizard}} @step={{this.step}} />
</div>
</div>
<div class="preview-nav">
<a href class="preview-nav-button {{if previewTopic "active"}}" {{action "setPreviewTopic"}}>
<a href class="preview-nav-button {{if this.previewTopic "active"}}" {{action "setPreviewTopic"}}>
{{i18n "wizard.previews.topic_preview"}}
</a>
<a href class="preview-nav-button {{unless previewTopic "active"}}" {{action "setPreviewHomepage"}}>
<a href class="preview-nav-button {{unless this.previewTopic "active"}}" {{action "setPreviewHomepage"}}>
{{i18n "wizard.previews.homepage_preview"}}
</a>
</div>
@@ -1,8 +1,8 @@
<div class="preview-area">
<canvas
width={{elementWidth}}
height={{elementHeight}}
style={{canvasStyle}}
width={{this.elementWidth}}
height={{this.elementHeight}}
style={{this.canvasStyle}}
>
</canvas>
</div>
@@ -1,4 +1,4 @@
<label>
<Input @type="checkbox" class="wizard-checkbox" @checked={{field.value}} />
{{field.placeholder}}
<Input @type="checkbox" class="wizard-checkbox" @checked={{this.field.value}} />
{{this.field.placeholder}}
</label>
@@ -1,5 +1,5 @@
{{#each field.choices as |c|}}
<div class="checkbox-field-choice {{fieldClass}}">
{{#each this.field.choices as |c|}}
<div class="checkbox-field-choice {{this.fieldClass}}">
<label id={{c.id}} value={{c.label}}>
<Input @type="checkbox" class="wizard-checkbox" @click={{action "changed" value="target"}} @checked={{c.checked}} />
{{#if c.icon}}
@@ -1,8 +1,8 @@
{{component
componentName
class=fieldClass
value=field.value
content=field.choices
this.componentName
class=this.fieldClass
value=this.field.value
content=this.field.choices
nameProperty="label"
tabindex="9"
onChange=(action "onChangeValue")
@@ -1,14 +1,14 @@
{{#if field.value}}
{{component previewComponent field=field fieldClass=fieldClass wizard=wizard}}
{{#if this.field.value}}
{{component this.previewComponent field=this.field fieldClass=this.fieldClass wizard=this.wizard}}
{{/if}}
<label class="wizard-btn wizard-btn-upload {{if uploading "disabled"}}">
{{#if uploading}}
<label class="wizard-btn wizard-btn-upload {{if this.uploading "disabled"}}">
{{#if this.uploading}}
{{i18n "wizard.uploading"}}
{{else}}
{{i18n "wizard.upload"}}
{{d-icon "far-image"}}
{{/if}}
<input class="wizard-hidden-upload-field" disabled={{uploading}} type="file" accept="image/*">
<input class="wizard-hidden-upload-field" disabled={{this.uploading}} type="file" accept="image/*">
</label>
@@ -1,7 +1,7 @@
{{#each field.choices as |choice|}}
<div class="radio-field-choice {{fieldClass}}">
{{#each this.field.choices as |choice|}}
<div class="radio-field-choice {{this.fieldClass}}">
<div class="radio-area">
<RadioButton @selection={{field.value}} @value={{choice.id}} @name={{choice.label}} @onChange={{action "changed"}} />
<RadioButton @selection={{this.field.value}} @value={{choice.id}} @name={{choice.label}} @onChange={{action "changed"}} />
<span class="radio-label">
{{#if choice.icon}}
@@ -1 +1 @@
<Input @id={{field.id}} @value={{field.value}} class={{fieldClass}} placeholder={{field.placeholder}} @tabindex="9" />
<Input @id={{this.field.id}} @value={{this.field.value}} class={{this.fieldClass}} placeholder={{this.field.placeholder}} @tabindex="9" />
@@ -1 +1 @@
<Textarea @id={{field.id}} @value={{field.value}} class={{fieldClass}} placeholder={{field.placeholder}} @tabindex="9" />
<Textarea @id={{this.field.id}} @value={{this.field.value}} class={{this.fieldClass}} placeholder={{this.field.placeholder}} @tabindex="9" />
@@ -1,31 +1,31 @@
<label for={{field.id}}>
<label for={{this.field.id}}>
<span class="label-value">
{{field.label}}
{{this.field.label}}
{{#if field.required}}
{{#if this.field.required}}
<span class="field-required">*</span>
{{/if}}
</span>
{{#if field.description}}
<div class="field-description">{{html-safe field.description}}</div>
{{#if this.field.description}}
<div class="field-description">{{html-safe this.field.description}}</div>
{{/if}}
</label>
<div class="input-area">
{{component
inputComponentName
field=field
step=step
fieldClass=fieldClass
wizard=wizard
this.inputComponentName
field=this.field
step=this.step
fieldClass=this.fieldClass
wizard=this.wizard
}}
</div>
{{#if field.errorDescription}}
<div class="field-error-description">{{html-safe field.errorDescription}}</div>
{{#if this.field.errorDescription}}
<div class="field-error-description">{{html-safe this.field.errorDescription}}</div>
{{/if}}
{{#if field.extra_description}}
<div class="field-extra-description">{{html-safe field.extra_description}}</div>
{{#if this.field.extra_description}}
<div class="field-extra-description">{{html-safe this.field.extra_description}}</div>
{{/if}}
@@ -1 +1 @@
<img src={{field.value}} class={{fieldClass}}>
<img src={{this.field.value}} class={{this.fieldClass}}>
@@ -1,32 +1,32 @@
<div class="wizard-step-contents">
{{#if step.title}}
<h1 class="wizard-step-title">{{step.title}}</h1>
{{#if this.step.title}}
<h1 class="wizard-step-title">{{this.step.title}}</h1>
{{/if}}
<div class={{bannerAndDescriptionClass}}>
{{#if bannerImage}}
<img src={{bannerImage}} class="wizard-step-banner">
<div class={{this.bannerAndDescriptionClass}}>
{{#if this.bannerImage}}
<img src={{this.bannerImage}} class="wizard-step-banner">
{{/if}}
{{#if step.description}}
<p class="wizard-step-description">{{html-safe step.description}}</p>
{{#if this.step.description}}
<p class="wizard-step-description">{{html-safe this.step.description}}</p>
{{/if}}
</div>
<WizardStepForm @step={{step}}>
{{#if includeSidebar}}
<WizardStepForm @step={{this.step}}>
{{#if this.includeSidebar}}
<div class="wizard-fields-sidebar">
{{#each step.fields as |field|}}
{{#each this.step.fields as |field|}}
{{#if field.show_in_sidebar}}
<WizardField @field={{field}} @step={{step}} @wizard={{wizard}} />
<WizardField @field={{field}} @step={{this.step}} @wizard={{this.wizard}} />
{{/if}}
{{/each}}
</div>
{{/if}}
<div class="wizard-fields-main">
{{#each step.fields as |field|}}
{{#each this.step.fields as |field|}}
{{#unless field.show_in_sidebar}}
<WizardField @field={{field}} @step={{step}} @wizard={{wizard}} />
<WizardField @field={{field}} @step={{this.step}} @wizard={{this.wizard}} />
{{/unless}}
{{/each}}
</div>
@@ -37,35 +37,35 @@
<div class="wizard-progress">
<div class="white"></div>
<div style={{barStyle}} class="black"></div>
<div style={{this.barStyle}} class="black"></div>
<div class="screen"></div>
<span>{{bound-i18n "wizard.step" current=step.displayIndex total=wizard.totalSteps}}</span>
<span>{{bound-i18n "wizard.step" current=this.step.displayIndex total=this.wizard.totalSteps}}</span>
</div>
<div class="wizard-buttons">
{{#if showQuitButton}}
{{#if this.showQuitButton}}
<a href {{action "quit"}} tabindex="11" class="action-link quit">{{i18n "wizard.quit"}}</a>
{{/if}}
{{#if showFinishButton}}
<button {{action "exitEarly"}} disabled={{saving}} tabindex="10" type="button" class="wizard-btn finish">
{{#if this.showFinishButton}}
<button {{action "exitEarly"}} disabled={{this.saving}} tabindex="10" type="button" class="wizard-btn finish">
{{i18n "wizard.finish"}}
</button>
{{/if}}
{{#if showBackButton}}
{{#if this.showBackButton}}
<a href {{action "backStep"}} tabindex="11" class="action-link back">{{i18n "wizard.back"}}</a>
{{/if}}
{{#if showNextButton}}
<button {{action "nextStep"}} disabled={{saving}} tabindex="10" type="button" class="wizard-btn next primary">
{{#if this.showNextButton}}
<button {{action "nextStep"}} disabled={{this.saving}} tabindex="10" type="button" class="wizard-btn next primary">
{{i18n "wizard.next"}}
{{d-icon "chevron-right"}}
</button>
{{/if}}
{{#if showDoneButton}}
<button {{action "quit"}} disabled={{saving}} tabindex="10" type="button" class="wizard-btn done">
{{#if this.showDoneButton}}
<button {{action "quit"}} disabled={{this.saving}} tabindex="10" type="button" class="wizard-btn done">
{{i18n "wizard.done"}}
</button>
{{/if}}
@@ -1 +1 @@
<WizardStep @step={{step}} @wizard={{wizard}} @goNext={{action "goNext"}} @goBack={{action "goBack"}} />
<WizardStep @step={{this.step}} @wizard={{this.wizard}} @goNext={{action "goNext"}} @goBack={{action "goBack"}} />
@@ -1,5 +1,5 @@
<div id="wizard-main">
{{#if showCanvas}}
{{#if this.showCanvas}}
<WizardCanvas />
{{/if}}
@@ -9,7 +9,7 @@
{{!-- Load all font styles --}}
<div class="preloaded-font-styles">
{{#each fontClasses as |fontClass|}}
{{#each this.fontClasses as |fontClass|}}
<span class={{fontClass}}>&nbsp;</span>
<strong class={{fontClass}}>&nbsp;</strong>
{{/each}}