diff --git a/.husky/commit-msg b/.husky/commit-msg index fd2bf708..f6f2ce3f 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1 +1,2 @@ -npx --no-install commitlint --edit $1 +#!/usr/bin/env sh +npx --no-install commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit index beabb122..e77b172c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1,2 @@ -npm run lint:lint-staged +#!/usr/bin/env sh +npm run lint:lint-staged diff --git a/README.md b/README.md index f024ca69..94cf9cb4 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ 
## 项目简介 @@ -100,7 +100,7 @@ | -------- | ---------------------------------------------------------------------------------------------------------------------------------- | | 视频教程 | [https://www.bilibili.com/video/BV1eFUuYyEFj](https://www.bilibili.com/video/BV1eFUuYyEFj) | | 项目搭建 | [基于 Vue3 + Vite + TypeScript + Element-Plus 从0到1搭建后台管理系统](https://blog.csdn.net/u013737132/article/details/130191394) | -| 官方文档 | [https://www.youlai.tech/vue3-element-admin](https://www.youlai.tech/vue3-element-admin/) | +| 官方文档 | [https://www.youlai.tech/docs/web/](https://www.youlai.tech/docs/web/) | | 代码规范 | [ESLint V9 + Prettier + Stylelint + EditorConfig 约束和统一前端代码规范](https://youlai.blog.csdn.net/article/details/145608723) | | 提交规范 | [Husky + Lint-staged + Commitlint + Commitizen + cz-git 配置 Git 提交规范](https://youlai.blog.csdn.net/article/details/145615236) | | 接口文档 | [https://www.apifox.cn](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5) | @@ -177,7 +177,7 @@ server { 1. 获取基于 `Java` 和 `SpringBoot` 开发的后端 [youlai-boot](https://gitee.com/youlaiorg/youlai-boot.git) 源码。 2. 根据后端工程的说明文档 [README.md](https://gitee.com/youlaiorg/youlai-boot#%E9%A1%B9%E7%9B%AE%E8%BF%90%E8%A1%8C) 完成本地启动。 -3. 修改 `.env.development` 文件中的 `VITE_APP_API_URL` 的值,将其从 https://api.youlai.tech 更改为 http://localhost:8989 即可。 +3. 修改 `.env.development` 文件中的 `VITE_APP_API_URL` 的值,将其从 https://api.youlai.tech 更改为 http://localhost:8000 即可。 ## 注意事项 @@ -223,7 +223,7 @@ Thanks to all the contributors!
- ![]() + ![]() 公众号「有来技术」 |
diff --git a/eslint.config.ts b/eslint.config.ts index a8753377..4c32ca69 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -107,8 +107,8 @@ export default [ }, rules: { // 基础规则 - "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", - "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", + "no-console": ["error", { allow: ["warn", "error", "debug"] }], + "no-debugger": "error", // ES6+ 规则 "prefer-const": "error", @@ -116,7 +116,7 @@ export default [ "object-shorthand": "error", // 最佳实践 - eqeqeq: "off", + eqeqeq: ["error", "always", { null: "ignore" }], "no-multi-spaces": "error", "no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }], @@ -171,7 +171,7 @@ export default [ }, ], "vue/component-name-in-template-casing": ["error", "PascalCase"], - "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-explicit-any": "warn", }, }, @@ -189,7 +189,7 @@ export default [ }, rules: { // TypeScript 规则 - "@typescript-eslint/no-explicit-any": "off", // 允许使用any类型,方便开发 + "@typescript-eslint/no-explicit-any": "warn", // 逐步收敛 any 类型 "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-object-type": "off", "@typescript-eslint/ban-ts-comment": "off", diff --git a/mock/dict.mock.ts b/mock/dict.mock.ts index 131709b4..5452f658 100644 --- a/mock/dict.mock.ts +++ b/mock/dict.mock.ts @@ -145,7 +145,7 @@ export default defineMock([ let list = null; - if (dictCode == "gender") { + if (dictCode === "gender") { list = [ { value: "1", @@ -160,7 +160,7 @@ export default defineMock([ label: "保密", }, ]; - } else if (dictCode == "notice_level") { + } else if (dictCode === "notice_level") { list = [ { value: "L", @@ -178,7 +178,7 @@ export default defineMock([ tagType: "D", }, ]; - } else if (dictCode == "notice_type") { + } else if (dictCode === "notice_type") { list = [ { value: "1", diff --git a/src/App.vue b/src/App.vue index dca8b3a9..bc6d8b0f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,5 @@ |