[ESLint] Eslint config & rules fixes - #695
Conversation
| <div | ||
| class="currency-selector fx-row fx-gap-px-12 fx-malign-space-between fx-xalign-center" | ||
| role={{if this.allowCurrencyUpdate "button" "img"}} | ||
| tabindex={{if this.allowCurrencyUpdate "0"}} |
There was a problem hiding this comment.
Is this required by an ESlint rule change ?
There was a problem hiding this comment.
Yes, eslint rule required this one
| {{else if this.feedbackMessage}} | ||
| <span class={{concat "margin-top-px-6 font-color-" this.feedbackMessage.type "-500"}}> | ||
| {{#unless (eq this.feedbackMessage.type "error")}} | ||
| {{#if (not-eq this.feedbackMessage.type "error")}} |
There was a problem hiding this comment.
Good thing Edouard isn't here on this one 🧌
| <div | ||
| class="fx-row fx-xalign-center fx-gap-px-6" | ||
| role={{if @mainAction "button"}} | ||
| tabindex={{if @mainAction "0"}} |
There was a problem hiding this comment.
Another tabIndex here, my guess is that a rule requires this, you can disregard my first comment above I guess ^^
| } | ||
|
|
||
| if (this.args.loading && !this.args.loadingOptions?.showLabel) { | ||
| // The width must be frozen before the spinner replaces the label, hence the side-effect. |
There was a problem hiding this comment.
Probably can get rid of the comment above the TS-ignore :)
| } | ||
|
|
||
| @computed('args.step.{displayState,hidden}') | ||
| @computed('args.step.{displayState,hidden}', 'baseClass') |
There was a problem hiding this comment.
why is baseClass needed here ? Isn't that gonna recompute the getter way more than it should ?
| } | ||
|
|
||
| let arrowEl = floatingTarget.querySelector('[data-floating-arrow]'); | ||
| const arrowEl = floatingTarget.querySelector('[data-floating-arrow]'); |
There was a problem hiding this comment.
Can I be an a**hole & ask for renaming this into arrowElement ? 💀
| // Implement the logic for step submission here | ||
| // For example, this can be bound to the submit button of an OSS::Form component | ||
| // we would then validate the inputs and resolve true or false based on the validations | ||
| resolve(true || false); |
There was a problem hiding this comment.
I have no words for this one 😆
| } | ||
|
|
||
| get storyComponent() { | ||
| // The class is a dynamic backing class filled in below, not a component file. |
| @action | ||
| onSelectionNavTab(selectedTab: {}): void { | ||
| onSelectionNavTab(selectedTab: object): void { | ||
| console.log('onSelectionNavTab : ', selectedTab); |
There was a problem hiding this comment.
If you're there, can you remove that console log ?
| text-align: center; | ||
| } | ||
|
|
||
| .demo-outlet { |
There was a problem hiding this comment.
For other reviewers, this is added to avoid some styling in templates a few files down ( a few meaning 20 🧌 )
| import { assert } from '@ember/debug'; | ||
| import { htmlSafe } from '@ember/template'; | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-empty-object-type |
There was a problem hiding this comment.
Same as others eslint PR, could be great to edit the shared conf to allow this
|
|
||
| {{#if this.displayDropdown}} | ||
| <div | ||
| {{! template-lint-disable no-invalid-interactive }} |
There was a problem hiding this comment.
As there is always an action, should we add a role="button" instead ?
| <div | ||
| {{! template-lint-disable no-invalid-interactive }} | ||
| class="upf-checkbox {{this.modifierClasses}}" | ||
| ...attributes |
There was a problem hiding this comment.
Maybe add a role="button" here too
There was a problem hiding this comment.
I can for this one, I have error Do not use <label> inside an element with role="button"`` and I don't want to change the struture
| } | ||
|
|
||
| @computed('args.step.{displayState,hidden}') | ||
| @computed('args.step.{displayState,hidden}', 'baseClass') |
| */ | ||
| export const RICH_TEXT_SVG_CONFIG: DOMPurify.Config = { | ||
| ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms):|[^a-z]|[a-z+.\-]+(?:[^a-z+.-:]|$))/i, | ||
| ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i, |
There was a problem hiding this comment.
I've not tested, but this change has no impact ?
There was a problem hiding this comment.
The error is Unnecessary escape character: \- , should not break things
8427cae to
ab97f45
Compare
What does this PR do?
Eslint config & rules fixes
What are the observable changes?
Good PR checklist