diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..932460e --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# 忽略目录 +/dist +/node_modules +.hbuilderx/* +.idea/* + +# 忽略文件 +*.log +**/*.tsbuildinfo +.eslintcache +pnpm-lock.yaml +/.eslintrc-auto-import.json +/typings/ diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..152f324 --- /dev/null +++ b/.npmrc @@ -0,0 +1,6 @@ +# 提示:如果你想自动安装对等依赖,在项目根目录下的.npmrc文件中添加"auto-install-peers=true"。 +# 提示:如果你不希望pnpm在对等依赖问题上失败,在项目根目录下的.npmrc文件中添加"strict-peer-dependencies=false"。 +# auto-install-peers=true +strict-peer-dependencies=false +# registry=https://registry.npmmirror.com +registry=https://registry.npmjs.org diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..ad1ba07 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,12 @@ +////////////////////////////////// +// 向此工作区的用户推荐的扩展列表 // +///////////////////////////////// + +{ + "recommendations": [ + "Vue.volar", // Vue语言支持扩展 + "Vue.vscode-typescript-vue-plugin", // 一个TS服务器插件,使TS服务器知道*.vue文件。 + "esbenp.prettier-vscode", // 代码格式化 + "dbaeumer.vscode-eslint" // 代码质量检查 + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..57425c6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,73 @@ +//////////////////////////////////////////////////////////////////////////// +// vscode 编辑器和插件的配置 //////////////////////////////////////////////// +// 参考:https://blog.csdn.net/weixin_46238462/article/details/125867532 // +////////////////////////////////////////////////////////////////////////// + +{ + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.detectIndentation": false, + "editor.tabSize": 4, + "files.eol": "auto", + "eslint.enable": true, + + ////////////////////////////////////////////////////////////////// + // 官网参考:https://prettier.io/docs/en/options.html#tab-width // + //////////////////////////////////////////////////////////////// + "prettier.semi": true, + "prettier.tabWidth": 4, + "prettier.printWidth": 160, + "prettier.endOfLine": "auto", + "prettier.singleQuote": true, + "prettier.ignorePath": ".prettierignore", + // Enable the ESlint flat config support + // (remove this if your ESLint extension above v3.0.5) + "eslint.experimental.useFlatConfig": true, + + // Disable the default formatter, use eslint instead + "prettier.enable": false, + "editor.formatOnSave": false, + + // Auto fix + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + + // Silent the stylistic rules in you IDE, but still auto fix them + "eslint.rules.customizations": [ + { "rule": "style/*", "severity": "off" }, + { "rule": "format/*", "severity": "off" }, + { "rule": "*-indent", "severity": "off" }, + { "rule": "*-spacing", "severity": "off" }, + { "rule": "*-spaces", "severity": "off" }, + { "rule": "*-order", "severity": "off" }, + { "rule": "*-dangle", "severity": "off" }, + { "rule": "*-newline", "severity": "off" }, + { "rule": "*quotes", "severity": "off" }, + { "rule": "*semi", "severity": "off" } + ], + + // Enable eslint for all supported languages + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + "yaml", + "toml", + "xml", + "gql", + "graphql", + "astro", + "css", + "less", + "scss", + "pcss", + "postcss" + ] +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..38525e3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 h_mo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad94989 --- /dev/null +++ b/README.md @@ -0,0 +1,235 @@ +# 🌈 uni-app Vue3 Vite4 pinia2 TypeScript 基础框架 + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+