From 6f75dd72b9e435c4b9c0258bf39b90dcc85f4b61 Mon Sep 17 00:00:00 2001 From: m1m1sha <18262227804@163.com> Date: Mon, 6 May 2024 10:49:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20chore:=20eslint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- easytier-gui/.prettierrc.json | 4 ++++ easytier-gui/eslint.config.js | 14 +++++++++++--- easytier-gui/package.json | 12 ++++++++---- 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 easytier-gui/.prettierrc.json diff --git a/easytier-gui/.prettierrc.json b/easytier-gui/.prettierrc.json new file mode 100644 index 0000000..b2095be --- /dev/null +++ b/easytier-gui/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "semi": false, + "singleQuote": true +} diff --git a/easytier-gui/eslint.config.js b/easytier-gui/eslint.config.js index d869433..6bc3ab7 100644 --- a/easytier-gui/eslint.config.js +++ b/easytier-gui/eslint.config.js @@ -1,7 +1,15 @@ // @ts-check -import antfu from "@antfu/eslint-config"; +import antfu from '@antfu/eslint-config' export default antfu({ - unocss: true, formatters: true, -}); + ignores: [ + 'dist', + 'node_modules', + 'src-tauri', + 'src/vite-env.d.ts', + 'src/typed-router.d.ts', + 'src/auto-imports.d.ts', + 'src/components.d.ts', + ], +}) diff --git a/easytier-gui/package.json b/easytier-gui/package.json index bb9aa06..53eea70 100644 --- a/easytier-gui/package.json +++ b/easytier-gui/package.json @@ -1,13 +1,14 @@ { "name": "easytier-gui", - "private": true, - "version": "0.0.0", "type": "module", + "version": "0.0.0", + "private": true, "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build", "preview": "vite preview", - "tauri": "tauri" + "tauri": "tauri", + "lint": "eslint ." }, "dependencies": { "@tauri-apps/api": "^1", @@ -26,8 +27,10 @@ "@types/node": "^20.12.8", "@types/uuid": "^9.0.8", "@vitejs/plugin-vue": "^5.0.4", - "eslint": "^9.2.0", + "@vue-macros/volar": "^0.19.0", "autoprefixer": "^10.4.19", + "eslint": "^9.2.0", + "eslint-plugin-format": "^0.1.1", "naive-ui": "^2.38.2", "postcss": "^8.4.38", "tailwindcss": "^3.4.3", @@ -42,6 +45,7 @@ "vite": "^5.2.11", "vite-plugin-vue-devtools": "^7.1.3", "vite-plugin-vue-layouts": "^0.11.0", + "prettier": "^3.2.5", "vue-i18n": "^9.13.1", "vue-tsc": "^2.0.16" }