diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..35ed473 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,17 @@ +module.exports = { + env: { + browser: true, + es2021: true, + node: true, + }, + extends: ["plugin:vue/essential", "plugin:prettier/recommended"], + parserOptions: { + ecmaVersion: "latest", + parser: "@typescript-eslint/parser", + sourceType: "module", + }, + plugins: ["vue", "@typescript-eslint", "prettier"], + rules: { + "prettier/prettier": "error", + }, +}; diff --git a/.gitignore b/.gitignore index a547bf3..cf5f7b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Logs logs *.log +package-lock.json npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/package.json b/package.json index 444c6e3..57dcdd8 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,32 @@ { "name": "sql-generator", "private": true, - "version": "0.0.0", + "version": "0.0.1", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build", "preview": "vite preview" }, "dependencies": { + "@ant-design/icons-vue": "^6.1.0", + "ant-design-vue": "^3.2.3", "monaco-editor": "^0.33.0", "sql-formatter": "^4.0.2", - "tdesign-vue-next": "^0.14.1", "vue": "^3.2.25" }, "devDependencies": { + "@typescript-eslint/eslint-plugin": "^5.23.0", + "@typescript-eslint/parser": "^5.23.0", "@vitejs/plugin-vue": "^2.3.1", + "eslint": "^8.15.0", + "eslint-config-prettier": "^8.5.0", + "eslint-config-standard": "^17.0.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-n": "^15.2.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-vue": "^8.7.1", + "prettier": "2.6.2", "typescript": "^4.5.4", "vite": "^2.9.7", "vue-tsc": "^0.34.7" diff --git a/src/App.vue b/src/App.vue index 9c92ba4..57b7bc9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,73 +1,83 @@ + \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 7beac30..103fc5f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,10 +1,7 @@ -import { createApp } from 'vue'; -import TDesign from 'tdesign-vue-next'; -import App from './app.vue'; - -// 引入组件库全局样式资源 -import 'tdesign-vue-next/es/style/index.css'; +import { createApp } from "vue"; +import App from "./App.vue"; +import Antd from "ant-design-vue"; +import "ant-design-vue/dist/antd.css"; const app = createApp(App); -app.use(TDesign); -app.mount('#app'); \ No newline at end of file +app.use(Antd).mount("#app"); diff --git a/tsconfig.json b/tsconfig.json index bcc4abd..6a55dc8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,9 +10,21 @@ "resolveJsonModule": true, "isolatedModules": true, "esModuleInterop": true, - "lib": ["esnext", "dom"], + "lib": [ + "esnext", + "dom" + ], "skipLibCheck": true }, - "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], - "references": [{ "path": "./tsconfig.node.json" }] + "include": [ + "src/**/*.ts", + "src/**/*.d.ts", + "src/**/*.tsx", + "src/**/*.vue" + ], + "references": [ + { + "path": "./tsconfig.node.json" + } + ] } diff --git a/tsconfig.node.json b/tsconfig.node.json index e993792..fe87409 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -4,5 +4,7 @@ "module": "esnext", "moduleResolution": "node" }, - "include": ["vite.config.ts"] + "include": [ + "vite.config.ts" + ] } diff --git a/vite.config.ts b/vite.config.ts index 315212d..d4a6446 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,11 @@ -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()] -}) + server: { + open: true, + hmr: true, + }, + plugins: [vue()], +});