-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
156 changed files
with
19,114 additions
and
14,390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 本地环境 | ||
VITE_USER_NODE_ENV = development | ||
|
||
# 公共基础路径 | ||
VITE_PUBLIC_PATH = / | ||
|
||
# 路由模式 | ||
# Optional: hash | history | ||
VITE_ROUTER_MODE = hash | ||
|
||
# 打包时是否删除 console | ||
VITE_DROP_CONSOLE = true | ||
|
||
# 是否开启 VitePWA | ||
VITE_PWA = false | ||
|
||
# 开发环境接口地址 | ||
VITE_API_URL = /api | ||
|
||
# 开发环境跨域代理,支持配置多个 | ||
VITE_PROXY = [["/api","https://mock.mengxuegu.com/mock/629d727e6163854a32e8307e"]] | ||
# VITE_PROXY = [["/api","https://www.fastmock.site/mock/f81e8333c1a9276214bcdbc170d9e0a0"]] | ||
# VITE_PROXY = [["/api-easymock","https://mock.mengxuegu.com"],["/api-fastmock","https://www.fastmock.site"]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 线上环境 | ||
VITE_USER_NODE_ENV = production | ||
|
||
# 公共基础路径 | ||
VITE_PUBLIC_PATH = / | ||
|
||
# 路由模式 | ||
# Optional: hash | history | ||
VITE_ROUTER_MODE = hash | ||
|
||
|
||
# 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔 | ||
# Optional: gzip | brotli | none | ||
VITE_BUILD_COMPRESS = none | ||
|
||
# 打包压缩后是否删除源文件 | ||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false | ||
|
||
# 打包时是否删除 console | ||
VITE_DROP_CONSOLE = true | ||
|
||
# 是否开启 VitePWA | ||
VITE_PWA = true | ||
|
||
# 线上环境接口地址 | ||
VITE_API_URL = "https://www.fastmock.site/mock/f81e8333c1a9276214bcdbc170d9e0a0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 测试环境 | ||
VITE_USER_NODE_ENV = test | ||
|
||
# 公共基础路径 | ||
VITE_PUBLIC_PATH = / | ||
|
||
# 路由模式 | ||
# Optional: hash | history | ||
VITE_ROUTER_MODE = hash | ||
|
||
|
||
# 是否启用 gzip 或 brotli 压缩打包,如果需要多个压缩规则,可以使用 “,” 分隔 | ||
# Optional: gzip | brotli | none | ||
VITE_BUILD_COMPRESS = none | ||
|
||
# 打包压缩后是否删除源文件 | ||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false | ||
|
||
# 打包时是否删除 console | ||
VITE_DROP_CONSOLE = true | ||
|
||
# 是否开启 VitePWA | ||
VITE_PWA = false | ||
|
||
# 测试环境接口地址 | ||
VITE_API_URL = "https://www.fastmock.site/mock/f81e8333c1a9276214bcdbc170d9e0a0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.sh | ||
node_modules | ||
*.md | ||
*.woff | ||
*.ttf | ||
.vscode | ||
.idea | ||
dist | ||
/public | ||
/docs | ||
.husky | ||
.local | ||
/bin | ||
/src/mock/* | ||
stats.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// @see: http://eslint.cn | ||
|
||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true | ||
}, | ||
// 指定如何解析语法 | ||
parser: "vue-eslint-parser", | ||
// 优先级低于 parse 的语法解析配置 | ||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
ecmaVersion: 2020, | ||
sourceType: "module", | ||
jsxPragma: "React", | ||
ecmaFeatures: { | ||
jsx: true | ||
} | ||
}, | ||
// 继承某些已有的规则 | ||
extends: ["plugin:vue/vue3-recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], | ||
/** | ||
* "off" 或 0 ==> 关闭规则 | ||
* "warn" 或 1 ==> 打开的规则作为警告(不影响代码执行) | ||
* "error" 或 2 ==> 规则作为一个错误(代码不能执行,界面报错) | ||
*/ | ||
rules: { | ||
// eslint (http://eslint.cn/docs/rules) | ||
"no-var": "error", // 要求使用 let 或 const 而不是 var | ||
"no-multiple-empty-lines": ["error", { max: 1 }], // 不允许多个空行 | ||
"prefer-const": "off", // 使用 let 关键字声明但在初始分配后从未重新分配的变量,要求使用 const | ||
"no-use-before-define": "off", // 禁止在 函数/类/变量 定义之前使用它们 | ||
|
||
// typeScript (https://typescript-eslint.io/rules) | ||
"@typescript-eslint/no-unused-vars": "error", // 禁止定义未使用的变量 | ||
"@typescript-eslint/no-empty-function": "error", // 禁止空函数 | ||
"@typescript-eslint/prefer-ts-expect-error": "error", // 禁止使用 @ts-ignore | ||
"@typescript-eslint/ban-ts-comment": "error", // 禁止 @ts-<directive> 使用注释或要求在指令后进行描述 | ||
"@typescript-eslint/no-inferrable-types": "off", // 可以轻松推断的显式类型可能会增加不必要的冗长 | ||
"@typescript-eslint/no-namespace": "off", // 禁止使用自定义 TypeScript 模块和命名空间 | ||
"@typescript-eslint/no-explicit-any": "off", // 禁止使用 any 类型 | ||
"@typescript-eslint/ban-types": "off", // 禁止使用特定类型 | ||
"@typescript-eslint/no-var-requires": "off", // 允许使用 require() 函数导入模块 | ||
"@typescript-eslint/no-non-null-assertion": "off", // 不允许使用后缀运算符的非空断言(!) | ||
|
||
// vue (https://eslint.vuejs.org/rules) | ||
"vue/script-setup-uses-vars": "error", // 防止<script setup>使用的变量<template>被标记为未使用,此规则仅在启用该 no-unused-vars 规则时有效 | ||
"vue/v-slot-style": "error", // 强制执行 v-slot 指令样式 | ||
"vue/no-mutating-props": "error", // 不允许改变组件 prop | ||
"vue/custom-event-name-casing": "error", // 为自定义事件名称强制使用特定大小写 | ||
"vue/html-closing-bracket-newline": "error", // 在标签的右括号之前要求或禁止换行 | ||
"vue/attribute-hyphenation": "error", // 对模板中的自定义组件强制执行属性命名样式:my-prop="prop" | ||
"vue/attributes-order": "off", // vue api使用顺序,强制执行属性顺序 | ||
"vue/no-v-html": "off", // 禁止使用 v-html | ||
"vue/require-default-prop": "off", // 此规则要求为每个 prop 为必填时,必须提供默认值 | ||
"vue/multi-word-component-names": "off", // 要求组件名称始终为 “-” 链接的单词 | ||
"vue/no-setup-props-destructure": "off" // 禁止解构 props 传递给 setup | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
stats.html | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
!.vscode/settings.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/dist/* | ||
/public/* | ||
public/* | ||
stats.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// @see: https://stylelint.io | ||
|
||
module.exports = { | ||
root: true, | ||
// 继承某些已有的规则 | ||
extends: [ | ||
"stylelint-config-standard", // 配置 stylelint 拓展插件 | ||
"stylelint-config-html/vue", // 配置 vue 中 template 样式格式化 | ||
"stylelint-config-standard-scss", // 配置 stylelint scss 插件 | ||
"stylelint-config-recommended-vue/scss", // 配置 vue 中 scss 样式格式化 | ||
"stylelint-config-recess-order" // 配置 stylelint css 属性书写顺序插件, | ||
], | ||
overrides: [ | ||
// 扫描 .vue/html 文件中的 <style> 标签内的样式 | ||
{ | ||
files: ["**/*.{vue,html}"], | ||
customSyntax: "postcss-html" | ||
} | ||
], | ||
rules: { | ||
"function-url-quotes": "always", // URL 的引号 "always(必须加上引号)"|"never(没有引号)" | ||
"color-hex-length": "long", // 指定 16 进制颜色的简写或扩写 "short(16进制简写)"|"long(16进制扩写)" | ||
"rule-empty-line-before": "never", // 要求或禁止在规则之前的空行 "always(规则之前必须始终有一个空行)"|"never(规则前绝不能有空行)"|"always-multi-line(多行规则之前必须始终有一个空行)"|"never-multi-line(多行规则之前绝不能有空行)" | ||
"font-family-no-missing-generic-family-keyword": null, // 禁止在字体族名称列表中缺少通用字体族关键字 | ||
"scss/at-import-partial-extension": null, // 解决不能使用 @import 引入 scss 文件 | ||
"property-no-unknown": null, // 禁止未知的属性 | ||
"no-empty-source": null, // 禁止空源码 | ||
"selector-class-pattern": null, // 强制选择器类名的格式 | ||
"value-no-vendor-prefix": null, // 关闭 vendor-prefix (为了解决多行省略 -webkit-box) | ||
"no-descending-specificity": null, // 不允许较低特异性的选择器出现在覆盖较高特异性的选择器 | ||
"value-keyword-case": null, // 解决在 scss 中使用 v-bind 大写单词报错 | ||
"selector-pseudo-class-no-unknown": [ | ||
true, | ||
{ | ||
ignorePseudoClasses: ["global", "v-deep", "deep"] | ||
} | ||
] | ||
}, | ||
ignoreFiles: ["**/*.js", "**/*.jsx", "**/*.tsx", "**/*.ts"] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"recommendations": [ | ||
"vue.volar", | ||
"vue.vscode-typescript-vue-plugin", | ||
"hollowtree.vue-snippets", | ||
"dbaeumer.vscode-eslint", | ||
"stylelint.vscode-stylelint", | ||
"esbenp.prettier-vscode", | ||
"editorconfig.editorconfig", | ||
"streetsidesoftware.code-spell-checker", | ||
"syler.sass-indented", | ||
"mikestead.dotenv" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.stylelint": "explicit" | ||
}, | ||
"stylelint.enable": true, | ||
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass", "html"], | ||
"files.eol": "\n", | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"[vue]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescriptreact]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[scss]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[html]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[markdown]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[less]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"cSpell.words": [ | ||
"AMAP", | ||
"apng", | ||
"axios", | ||
"Biao", | ||
"brotli", | ||
"cascader", | ||
"commitlint", | ||
"contentleft", | ||
"contentright", | ||
"CSDN", | ||
"daterange", | ||
"datetimerange", | ||
"echarts", | ||
"fangda", | ||
"geeker", | ||
"Gitee", | ||
"hexs", | ||
"iconfont", | ||
"juejin", | ||
"liquidfill", | ||
"longpress", | ||
"monthrange", | ||
"nprogress", | ||
"officedocument", | ||
"openxmlformats", | ||
"Pageable", | ||
"persistedstate", | ||
"pinia", | ||
"pjpeg", | ||
"Prefixs", | ||
"screenfull", | ||
"sortablejs", | ||
"sousuo", | ||
"spreadsheetml", | ||
"styl", | ||
"stylelint", | ||
"stylelintignore", | ||
"stylelintrc", | ||
"suoxiao", | ||
"truetype", | ||
"tuichu", | ||
"unplugin", | ||
"unref", | ||
"VITE", | ||
"vuedraggable", | ||
"vueuse", | ||
"Vuex", | ||
"wangeditor", | ||
"xiala", | ||
"xiaoxi", | ||
"Yahei", | ||
"yiwen", | ||
"zhongyingwen", | ||
"zhuti" | ||
] | ||
} |
Oops, something went wrong.