diff --git a/.eslintrc.cjs b/.eslintrc.cjs index c1ecb0866..e918c3ee5 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -223,7 +223,7 @@ module.exports = { 'import/order': [ 'warn', { - groups: ['builtin', 'external', ['parent', 'internal', 'index'], 'sibling'], + groups: ['builtin', 'external', 'internal', 'unknown', 'parent', 'sibling', 'index', 'object', 'type'], pathGroups: [ { pattern: '~/**', diff --git a/.vscode/settings.json b/.vscode/settings.json index 1b6457c5c..0c4e6e1d5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,7 @@ { "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + } } diff --git a/src/components/animation/animation.ts b/src/components/animation/animation.ts index 0dadb1b82..960c0a7cc 100644 --- a/src/components/animation/animation.ts +++ b/src/components/animation/animation.ts @@ -156,7 +156,6 @@ export default class SlAnimation extends LitElement { } async createAnimation() { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- The specified easing may not exist const easing = animations.easings[this.easing] ?? this.easing; const keyframes = this.keyframes ?? (animations as unknown as Partial>)[this.name]; const slot = await this.defaultSlot; diff --git a/src/components/dropdown/dropdown.ts b/src/components/dropdown/dropdown.ts index ea08fc23c..04bcc1685 100644 --- a/src/components/dropdown/dropdown.ts +++ b/src/components/dropdown/dropdown.ts @@ -1,4 +1,3 @@ -import type { Instance as PopperInstance } from '@popperjs/core/dist/esm'; import { createPopper } from '@popperjs/core/dist/esm'; import { html, LitElement } from 'lit'; import { customElement, property, query } from 'lit/decorators.js'; @@ -12,6 +11,7 @@ import { getTabbableBoundary } from '~/internal/tabbable'; import { watch } from '~/internal/watch'; import { getAnimation, setDefaultAnimation } from '~/utilities/animation-registry'; import styles from './dropdown.styles'; +import type { Instance as PopperInstance } from '@popperjs/core/dist/esm'; /** * @since 2.0 diff --git a/src/components/select/select.ts b/src/components/select/select.ts index a1857c262..9881391e2 100644 --- a/src/components/select/select.ts +++ b/src/components/select/select.ts @@ -1,4 +1,3 @@ -import type { TemplateResult } from 'lit'; import { html, LitElement } from 'lit'; import { customElement, property, query, state } from 'lit/decorators.js'; import { classMap } from 'lit/directives/class-map.js'; @@ -18,6 +17,7 @@ import { FormSubmitController, getLabelledBy, renderFormControl } from '~/intern import { getTextContent, HasSlotController } from '~/internal/slot'; import { watch } from '~/internal/watch'; import styles from './select.styles'; +import type { TemplateResult } from 'lit'; /** * @since 2.0 diff --git a/src/components/tooltip/tooltip.ts b/src/components/tooltip/tooltip.ts index 4ec0dbcf0..0827775a7 100644 --- a/src/components/tooltip/tooltip.ts +++ b/src/components/tooltip/tooltip.ts @@ -1,4 +1,3 @@ -import type { Instance as PopperInstance } from '@popperjs/core/dist/esm'; import { createPopper } from '@popperjs/core/dist/esm'; import { html, LitElement } from 'lit'; import { customElement, property, query } from 'lit/decorators.js'; @@ -8,6 +7,7 @@ import { emit, waitForEvent } from '~/internal/event'; import { watch } from '~/internal/watch'; import { getAnimation, setDefaultAnimation } from '~/utilities/animation-registry'; import styles from './tooltip.styles'; +import type { Instance as PopperInstance } from '@popperjs/core/dist/esm'; /** * @since 2.0 diff --git a/src/internal/form-control.ts b/src/internal/form-control.ts index 0364aba92..33f99839b 100644 --- a/src/internal/form-control.ts +++ b/src/internal/form-control.ts @@ -1,9 +1,9 @@ -import type { ReactiveController, ReactiveControllerHost, TemplateResult } from 'lit'; import { html } from 'lit'; import { classMap } from 'lit/directives/class-map.js'; import { ifDefined } from 'lit/directives/if-defined.js'; import type SlButton from '~/components/button/button'; import './formdata-event-polyfill'; +import type { ReactiveController, ReactiveControllerHost, TemplateResult } from 'lit'; export interface FormSubmitControllerOptions { /** A function that returns the form containing the form control. */