From cf5949cb7de9966a553ca4146f5020e2f20d1540 Mon Sep 17 00:00:00 2001 From: zestack Date: Wed, 29 Nov 2023 14:41:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=B0=83=E6=95=B4=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eslint.config.js | 22 -- package.json | 6 +- src/App.vue | 414 ++++++++++------------- src/assets/vue.svg | 7 +- src/engineer/components/Activity.vue | 27 +- src/engineer/components/Builder.vue | 4 +- src/engineer/components/Canvas.vue | 32 +- src/engineer/components/Configurator.vue | 52 +-- src/engineer/components/Designer.vue | 14 +- src/engineer/components/Engineer.vue | 12 +- src/engineer/context.ts | 25 +- src/engineer/render.ts | 68 ++-- src/engineer/utils/background.ts | 12 +- src/engineer/utils/border.ts | 25 +- src/engineer/utils/gap.ts | 8 +- src/engineer/utils/insets.ts | 16 +- src/engineer/utils/is.ts | 6 +- src/engineer/utils/object.ts | 19 +- src/engineer/utils/radii.ts | 12 +- src/engineer/utils/shadow.ts | 17 +- src/engineer/utils/unit.ts | 6 +- src/engineer/views/AudioView.vue | 2 +- src/engineer/views/ImageView.vue | 10 +- src/engineer/views/TextView.vue | 2 +- src/engineer/views/View.vue | 17 +- 25 files changed, 367 insertions(+), 468 deletions(-) delete mode 100644 eslint.config.js diff --git a/eslint.config.js b/eslint.config.js deleted file mode 100644 index 99bf0c7..0000000 --- a/eslint.config.js +++ /dev/null @@ -1,22 +0,0 @@ -import antfu from '@antfu/eslint-config' - -export default await antfu({ - stylistic: { - indent: 2, - quotes: 'single', - }, - typescript: true, - vue: true, - rules: { - 'vue/singleline-html-element-content-newline': 'off', - 'vue/html-self-closing': ['error', { - html: { - void: 'always', - normal: 'always', - component: 'always', - }, - svg: 'always', - math: 'always', - }], - }, -}) diff --git a/package.json b/package.json index d7c1469..8d5a8fd 100644 --- a/package.json +++ b/package.json @@ -6,19 +6,15 @@ "scripts": { "dev": "vite", "build": "vue-tsc && vite build", - "preview": "vite preview", - "lint": "eslint .", - "lint:fix": "eslint . --fix" + "preview": "vite preview" }, "dependencies": { "vue": "^3.3.8", "vuedraggable": "^4.1.0" }, "devDependencies": { - "@antfu/eslint-config": "^2.1.1", "@types/node": "^20.9.4", "@vitejs/plugin-vue": "^4.5.0", - "eslint": "^8.54.0", "less": "^4.2.0", "typescript": "^5.2.2", "vite": "^5.0.0", diff --git a/src/App.vue b/src/App.vue index 4debd20..d1809b3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,130 +1,110 @@ - @@ -47,8 +48,8 @@ function cloneModule(src: Module): Block {
@@ -58,17 +59,17 @@ function cloneModule(src: Module): Block {