diff --git a/eslint.config.js b/eslint.config.js index 6304f0a..5fd6402 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -4,13 +4,19 @@ // import vue_parser from 'vue-eslint-parser'; import lintConfig from '@antfu/eslint-config' +import simpleImportSort from 'eslint-plugin-simple-import-sort' export default lintConfig({ vue: true, markdown: true, ignores: [], + plugins: { + 'simple-import-sort': simpleImportSort, // 作为对象注册插件 + }, rules: { + 'simple-import-sort/imports': 'error', 'no-console': 0, + 'perfectionist/sort-imports': 'off', 'antfu/top-level-function': 0, 'ts/no-use-before-define': 0, 'no-alert': 0, diff --git a/package.json b/package.json index 960d2f9..75818cf 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "eslint": "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", + "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-vue": "^9.32.0", "husky": "^9.1.7", "lint-staged": "^15.4.3", diff --git a/src/apis/system.ts b/src/apis/system.ts index ec371ce..0b8bfff 100644 --- a/src/apis/system.ts +++ b/src/apis/system.ts @@ -1,7 +1,8 @@ -import { useSystemStore } from '@/stores/systemStore' import { createWebSocket } from 'libs/socket' import { nanoid } from 'nanoid' +import { useSystemStore } from '@/stores/systemStore' + const wsClient = createWebSocket() export async function sendCmd(resParams: System.SendCmdParams) { diff --git a/src/app.vue b/src/app.vue index 6cbe7bb..4584450 100644 --- a/src/app.vue +++ b/src/app.vue @@ -1,9 +1,11 @@