From 6c5e3e8f064cbf086999dd487c3f7c67a85fa6cc Mon Sep 17 00:00:00 2001 From: SkyJourney Date: Tue, 19 Dec 2023 05:37:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=80=E5=8F=91=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=92=8C=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E9=85=8D=E7=BD=AE=EF=BC=8C=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?eslint=E9=85=8D=E7=BD=AE=E5=92=8C=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 8 ++++++++ .env.production | 4 ++-- env.test => .env.test | 1 + .eslintrc.js => .eslintrc.cjs | 5 +++-- .gitignore | 1 + .npmrc | 5 +++++ package.json | 8 +++++++- 7 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 .env.dev rename env.test => .env.test (92%) rename .eslintrc.js => .eslintrc.cjs (97%) create mode 100644 .npmrc diff --git a/.env.dev b/.env.dev new file mode 100644 index 0000000..8b52258 --- /dev/null +++ b/.env.dev @@ -0,0 +1,8 @@ +NODE_ENV=development +#开发环境 +VITE_GLOB_API_URL=http://cqyt.dev.yg.dt.io + +#应急求助-websocket +VITE_GLOB_API_YIN_JI=ws://cqyt.dev.yg.dt.io/health-watch/websocket/watchMonitor +#健康监测工具报警-websocket +VITE_GLOB_API_JIAN_CE=ws://cqyt.dev.yg.dt.io/health-emergency/websocket/emergency diff --git a/.env.production b/.env.production index 00bd5f1..93e1a12 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,6 @@ #后台地址 VITE_GLOB_API_URL=https://api.cqygjk.com #应急求助-websocket -VITE_GLOB_API_YIN_JI=ws://api.cqygjk.com/health-watch/websocket/watchMonitor +VITE_GLOB_API_YIN_JI=wss://api.cqygjk.com/health-watch/websocket/watchMonitor #健康监测工具报警-websocket -VITE_GLOB_API_JIAN_CE=ws://api.cqygjk.com/health-emergency/websocket/emergency +VITE_GLOB_API_JIAN_CE=wss://api.cqygjk.com/health-emergency/websocket/emergency diff --git a/env.test b/.env.test similarity index 92% rename from env.test rename to .env.test index 52a13b3..f9fb6d2 100644 --- a/env.test +++ b/.env.test @@ -1,3 +1,4 @@ +NODE_ENV=development #测试环境 VITE_GLOB_API_URL=http://cqyt.test.yg.dt.io diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 97% rename from .eslintrc.js rename to .eslintrc.cjs index b6a3904..902cf2b 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -1,7 +1,8 @@ // @ts-check -import {defineConfig} from 'eslint-define-config' +// import {defineConfig} from 'eslint-define-config' // const {defineConfig} = require('eslint-define-config'); -export default { + +module.exports = { root: true, env: { browser: true, diff --git a/.gitignore b/.gitignore index a547bf3..3446cb9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? +pnpm-lock.yaml diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..8cb5dc2 --- /dev/null +++ b/.npmrc @@ -0,0 +1,5 @@ +shamefully-hoist=true +strict-peer-dependencies=false +registry=https://registry.npmmirror.com +auto-install-peers=true +canvas_binary_host_mirror=https://registry.npmmirror.com/-/binary/canvas \ No newline at end of file diff --git a/package.json b/package.json index cee59a4..9974b66 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,8 @@ "scripts": { "dev": "vite --open", "build": "vue-tsc && vite build", + "build:dev": "vue-tsc && vite build --mode dev", + "build:test": "vue-tsc && vite build --mode test", "preview": "vite preview", "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"" }, @@ -27,6 +29,9 @@ "devDependencies": { "@ant-design/colors": "^7.0.0", "@ant-design/icons-vue": "^6.1.0", + "@types/node": "^20.10.5", + "@typescript-eslint/eslint-plugin": "^6.15.0", + "@typescript-eslint/parser": "^6.15.0", "@vitejs/plugin-vue": "^4.2.3", "ant-design-vue": "^3.2.20", "echarts": "^5.4.3", @@ -34,8 +39,9 @@ "eslint-config-prettier": "^8.10.0", "eslint-define-config": "^1.24.1", "eslint-plugin-jest": "^27.4.2", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-vue": "^9.17.0", + "jest": "^29.7.0", "less": "^4.2.0", "typescript": "^5.0.2", "vite": "^4.4.5",