diff --git a/.eslintrc.js b/.eslintrc.js index 6f0cdbb6..74a721a4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -31,6 +31,7 @@ module.exports = { ignorePatterns: ['.eslintrc.js'], rules: { 'vue/no-mutating-props': 'off', + 'vue/multi-word-component-names': 'off', 'no-param-reassign': 'off', '@typescript-eslint/no-require-imports': 'off', "@typescript-eslint/no-misused-promises": [ diff --git a/packages/editor/package.json b/packages/editor/package.json index a64c6cdf..4e90f72f 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -24,7 +24,7 @@ "license": "Apache-2.0", "scripts": { "build": "npm run build:type && vite build", - "build:type": "npm run clear:type && vue-tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", + "build:type": "npm run clear:type && vue-tsc --declaration --emitDeclarationOnly --project tsconfig.build.json && tsc-alias -p tsconfig.build.json", "clear:type": "rimraf ./types" }, "engines": { @@ -78,6 +78,7 @@ "@vue/test-utils": "^2.0.0", "rimraf": "^3.0.2", "sass": "^1.35.1", + "tsc-alias": "^1.8.5", "typescript": "^5.0.4", "vite": "^4.2.1", "vite-plugin-vue-setup-extend": "^0.4.0", diff --git a/packages/editor/src/components/CodeDraftEditor.vue b/packages/editor/src/components/CodeDraftEditor.vue index b85f7ac4..a80bb984 100644 --- a/packages/editor/src/components/CodeDraftEditor.vue +++ b/packages/editor/src/components/CodeDraftEditor.vue @@ -32,8 +32,8 @@ import { TMagicButton, tMagicMessage, tMagicMessageBox } from '@tmagic/design'; import { Id } from '@tmagic/schema'; import { datetimeFormatter } from '@tmagic/utils'; -import MagicCodeEditor from '../layouts/CodeEditor.vue'; -import type { Services } from '../type'; +import MagicCodeEditor from '@editor/layouts/CodeEditor.vue'; +import type { Services } from '@editor/type'; const props = withDefaults( defineProps<{ diff --git a/packages/editor/src/components/ContentMenu.vue b/packages/editor/src/components/ContentMenu.vue index 46933773..22ea46f7 100644 --- a/packages/editor/src/components/ContentMenu.vue +++ b/packages/editor/src/components/ContentMenu.vue @@ -25,7 +25,7 @@