Lint: Add eslint import plugin (#5955)

## Summary

Adds the linter, turns on the recommended and a few extra rules, fixes
existing violations.

Doesn't prohibit `../../...` imports yet, that'll be it's own PR.

## Changes

- **What**: Consistent and fixable imports
- **Dependencies**: The plugin and parser

## Review Focus

How do you feel about the recommended rules?
What about the extra ones?
[Any
more](https://github.com/un-ts/eslint-plugin-import-x?tab=readme-ov-file#rules)
you'd want to turn on?

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5955-Lint-Add-eslint-import-plugin-2856d73d3650819985c0fb9ca3fa94b0)
by [Unito](https://www.unito.io)
This commit is contained in:
Alexander Brown
2025-10-07 20:31:00 -07:00
committed by GitHub
parent 45ebc59033
commit 874ef3ba0c
149 changed files with 1754 additions and 482 deletions

View File

@@ -27,12 +27,8 @@ import ColorPicker from 'primevue/colorpicker'
import { computed, ref, watch } from 'vue'
import type { SimplifiedWidget } from '@/types/simplifiedWidget'
import {
type ColorFormat,
type HSB,
isColorFormat,
toHexFromFormat
} from '@/utils/colorUtil'
import { isColorFormat, toHexFromFormat } from '@/utils/colorUtil'
import type { ColorFormat, HSB } from '@/utils/colorUtil'
import { cn } from '@/utils/tailwindUtil'
import {
PANEL_EXCLUDED_PROPS,

View File

@@ -7,10 +7,8 @@ import { createI18n } from 'vue-i18n'
import type { SimplifiedWidget } from '@/types/simplifiedWidget'
import WidgetGalleria, {
type GalleryImage,
type GalleryValue
} from './WidgetGalleria.vue'
import WidgetGalleria from './WidgetGalleria.vue'
import type { GalleryImage, GalleryValue } from './WidgetGalleria.vue'
const i18n = createI18n({
legacy: false,

View File

@@ -5,9 +5,8 @@ import { describe, expect, it } from 'vitest'
import type { SimplifiedWidget } from '@/types/simplifiedWidget'
import WidgetImageCompare, {
type ImageCompareValue
} from './WidgetImageCompare.vue'
import WidgetImageCompare from './WidgetImageCompare.vue'
import type { ImageCompareValue } from './WidgetImageCompare.vue'
describe('WidgetImageCompare Display', () => {
const createMockWidget = (

View File

@@ -18,10 +18,8 @@
import { computed } from 'vue'
import type { ResultItemType } from '@/schemas/apiSchema'
import {
type ComboInputSpec,
isComboInputSpec
} from '@/schemas/nodeDef/nodeDefSchemaV2'
import { isComboInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2'
import type { ComboInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2'
import type { SimplifiedWidget } from '@/types/simplifiedWidget'
import type { AssetKind } from '@/types/widgetTypes'

View File

@@ -16,11 +16,11 @@ import {
} from '@/utils/widgetPropFilter'
import FormDropdown from './form/dropdown/FormDropdown.vue'
import {
AssetKindKey,
type DropdownItem,
type FilterOption,
type SelectedKey
import { AssetKindKey } from './form/dropdown/types'
import type {
DropdownItem,
FilterOption,
SelectedKey
} from './form/dropdown/types'
import WidgetLayoutField from './layout/WidgetLayoutField.vue'

View File

@@ -6,7 +6,8 @@ import { describe, expect, it, vi } from 'vitest'
import type { SimplifiedWidget, WidgetValue } from '@/types/simplifiedWidget'
import WidgetTreeSelect, { type TreeNode } from './WidgetTreeSelect.vue'
import WidgetTreeSelect from './WidgetTreeSelect.vue'
import type { TreeNode } from './WidgetTreeSelect.vue'
const createTreeData = (): TreeNode[] => [
{

View File

@@ -4,7 +4,8 @@ import { computed, inject, ref } from 'vue'
import LazyImage from '@/components/common/LazyImage.vue'
import { cn } from '@/utils/tailwindUtil'
import { AssetKindKey, type LayoutMode } from './types'
import { AssetKindKey } from './types'
import type { LayoutMode } from './types'
interface Props {
index: number