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

@@ -4,7 +4,8 @@ import { computed, ref } from 'vue'
import { useErrorHandling } from '@/composables/useErrorHandling'
import type { ComfyExtension } from '@/types/comfy'
import { type KeybindingImpl, useKeybindingStore } from './keybindingStore'
import { useKeybindingStore } from './keybindingStore'
import type { KeybindingImpl } from './keybindingStore'
export interface ComfyCommand {
id: string

View File

@@ -3,7 +3,8 @@
import { merge } from 'es-toolkit/compat'
import { defineStore } from 'pinia'
import type { DialogPassThroughOptions } from 'primevue/dialog'
import { type Component, markRaw, ref } from 'vue'
import { markRaw, ref } from 'vue'
import type { Component } from 'vue'
import type GlobalDialog from '@/components/dialog/GlobalDialog.vue'

View File

@@ -2,7 +2,8 @@
* Stores all DOM widgets that are used in the canvas.
*/
import { defineStore } from 'pinia'
import { type Raw, computed, markRaw, ref } from 'vue'
import { computed, markRaw, ref } from 'vue'
import type { Raw } from 'vue'
import type { PositionConfig } from '@/composables/element/useAbsolutePosition'
import type { BaseDOMWidget } from '@/scripts/domWidget'

View File

@@ -1,7 +1,5 @@
import {
type DownloadState,
DownloadStatus
} from '@comfyorg/comfyui-electron-types'
import { DownloadStatus } from '@comfyorg/comfyui-electron-types'
import type { DownloadState } from '@comfyorg/comfyui-electron-types'
import { defineStore } from 'pinia'
import { computed, ref } from 'vue'

View File

@@ -1,11 +1,8 @@
import { FirebaseError } from 'firebase/app'
import {
type Auth,
AuthErrorCodes,
GithubAuthProvider,
GoogleAuthProvider,
type User,
type UserCredential,
browserLocalPersistence,
createUserWithEmailAndPassword,
deleteUser,
@@ -17,6 +14,7 @@ import {
signOut,
updatePassword
} from 'firebase/auth'
import type { Auth, User, UserCredential } from 'firebase/auth'
import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
import { useFirebaseAuth } from 'vuefire'

View File

@@ -6,10 +6,12 @@ import { useSettingStore } from '@/platform/settings/settingStore'
import type { BookmarkCustomization } from '@/schemas/apiSchema'
import type { TreeNode } from '@/types/treeExplorerTypes'
import { useNodeDefStore } from './nodeDefStore'
import {
buildNodeDefTree,
createDummyFolderNodeDef,
useNodeDefStore
} from './nodeDefStore'
import type { ComfyNodeDefImpl } from './nodeDefStore'
import { createDummyFolderNodeDef } from './nodeDefStore'
import { buildNodeDefTree } from './nodeDefStore'
const BOOKMARK_SETTING_ID = 'Comfy.NodeLibrary.Bookmarks.V2'

View File

@@ -17,11 +17,8 @@ import type {
} from '@/schemas/nodeDefSchema'
import { NodeSearchService } from '@/services/nodeSearchService'
import { useSubgraphStore } from '@/stores/subgraphStore'
import {
type NodeSource,
NodeSourceType,
getNodeSource
} from '@/types/nodeSource'
import { NodeSourceType, getNodeSource } from '@/types/nodeSource'
import type { NodeSource } from '@/types/nodeSource'
import type { TreeNode } from '@/types/treeExplorerTypes'
import type { FuseSearchable, SearchAuxScore } from '@/utils/fuseUtil'
import { buildTree } from '@/utils/treeUtil'

View File

@@ -2,10 +2,8 @@ import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
import type { InputSpec as InputSpecV2 } from '@/schemas/nodeDef/nodeDefSchemaV2'
import {
type InputSpec as InputSpecV1,
getInputSpecType
} from '@/schemas/nodeDefSchema'
import { getInputSpecType } from '@/schemas/nodeDefSchema'
import type { InputSpec as InputSpecV1 } from '@/schemas/nodeDefSchema'
import type { ComfyWidgetConstructor } from '@/scripts/widgets'
import { ComfyWidgets } from '@/scripts/widgets'