Skip to content

Commit 4d5fbef

Browse files
authored
Add eslint-plugin-unused-imports (#1121)
1 parent ad55722 commit 4d5fbef

File tree

5 files changed

+135
-46
lines changed

5 files changed

+135
-46
lines changed

eslint.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import globals from 'globals'
22
import pluginJs from '@eslint/js'
33
import tseslint from 'typescript-eslint'
44
import pluginVue from 'eslint-plugin-vue'
5+
import unusedImports from 'eslint-plugin-unused-imports'
56

67
export default [
78
{
@@ -35,5 +36,16 @@ export default [
3536
'@typescript-eslint/no-unused-vars': 'off',
3637
'@typescript-eslint/prefer-as-const': 'off'
3738
}
39+
},
40+
{
41+
plugins: {
42+
'unused-imports': unusedImports
43+
},
44+
rules: {
45+
'@typescript-eslint/no-explicit-any': 'off',
46+
'@typescript-eslint/no-unused-vars': 'off',
47+
'@typescript-eslint/prefer-as-const': 'off',
48+
'unused-imports/no-unused-imports': 'error'
49+
}
3850
}
3951
]

package-lock.json

Lines changed: 120 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"babel-plugin-transform-import-meta": "^2.2.1",
3737
"babel-plugin-transform-rename-import": "^2.3.0",
3838
"chalk": "^5.3.0",
39-
"eslint": "^9.8.0",
39+
"eslint": "^9.12.0",
40+
"eslint-plugin-unused-imports": "^4.1.4",
4041
"eslint-plugin-vue": "^9.27.0",
4142
"fs-extra": "^11.2.0",
4243
"globals": "^15.9.0",

src/stores/commandStore.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
import { useQueueSettingsStore, useQueueStore } from './queueStore'
1313
import { LiteGraph } from '@comfyorg/litegraph'
1414
import { ComfyExtension } from '@/types/comfy'
15-
import { useWorkspaceStore } from './workspaceStateStore'
1615
import { LGraphGroup } from '@comfyorg/litegraph'
1716
import { useTitleEditorStore } from './graphStore'
1817
import { useErrorHandling } from '@/hooks/errorHooks'

src/stores/workflowStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineStore } from 'pinia'
2-
import { computed, ref, watch } from 'vue'
2+
import { computed, ref } from 'vue'
33
import { ComfyWorkflow } from '@/scripts/workflows'
44
import { buildTree } from '@/utils/treeUtil'
55
import { api } from '@/scripts/api'

0 commit comments

Comments
 (0)