Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 82 additions & 82 deletions .eslintrc-auto-import.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
{
"globals": {
"Component": true,
"ComponentPublicInstance": true,
"ComputedRef": true,
"EffectScope": true,
"InjectionKey": true,
"PropType": true,
"Ref": true,
"VNode": true,
"acceptHMRUpdate": true,
"axios": true,
"computed": true,
"createApp": true,
"createPinia": true,
"customRef": true,
"defineAsyncComponent": true,
"defineComponent": true,
"defineStore": true,
"effectScope": true,
"getActivePinia": true,
"getCurrentInstance": true,
"getCurrentScope": true,
"h": true,
"http": true,
"inject": true,
"isProxy": true,
"isReactive": true,
"isReadonly": true,
"isRef": true,
"mapActions": true,
"mapGetters": true,
"mapState": true,
"mapStores": true,
"mapWritableState": true,
"markRaw": true,
"nextTick": true,
"onActivated": true,
"onBeforeMount": true,
"onBeforeRouteLeave": true,
"onBeforeRouteUpdate": true,
"onBeforeUnmount": true,
"onBeforeUpdate": true,
"onDeactivated": true,
"onErrorCaptured": true,
"onMounted": true,
"onRenderTracked": true,
"onRenderTriggered": true,
"onScopeDispose": true,
"onServerPrefetch": true,
"onUnmounted": true,
"onUpdated": true,
"provide": true,
"reactive": true,
"readonly": true,
"ref": true,
"request": true,
"resolveComponent": true,
"setActivePinia": true,
"setMapStoreSuffix": true,
"shallowReactive": true,
"shallowReadonly": true,
"shallowRef": true,
"storage": true,
"storeToRefs": true,
"toRaw": true,
"toRef": true,
"toRefs": true,
"triggerRef": true,
"unref": true,
"useAttrs": true,
"useCssModule": true,
"useCssVars": true,
"useLink": true,
"useRoute": true,
"useRouter": true,
"useSlots": true,
"watch": true,
"watchEffect": true,
"watchPostEffect": true,
"watchSyncEffect": true
}
}
"globals": {
"Component": true,
"ComponentPublicInstance": true,
"ComputedRef": true,
"EffectScope": true,
"InjectionKey": true,
"PropType": true,
"Ref": true,
"VNode": true,
"acceptHMRUpdate": true,
"axios": true,
"computed": true,
"createApp": true,
"createPinia": true,
"customRef": true,
"defineAsyncComponent": true,
"defineComponent": true,
"defineStore": true,
"effectScope": true,
"getActivePinia": true,
"getCurrentInstance": true,
"getCurrentScope": true,
"h": true,
"http": true,
"inject": true,
"isProxy": true,
"isReactive": true,
"isReadonly": true,
"isRef": true,
"mapActions": true,
"mapGetters": true,
"mapState": true,
"mapStores": true,
"mapWritableState": true,
"markRaw": true,
"nextTick": true,
"onActivated": true,
"onBeforeMount": true,
"onBeforeRouteLeave": true,
"onBeforeRouteUpdate": true,
"onBeforeUnmount": true,
"onBeforeUpdate": true,
"onDeactivated": true,
"onErrorCaptured": true,
"onMounted": true,
"onRenderTracked": true,
"onRenderTriggered": true,
"onScopeDispose": true,
"onServerPrefetch": true,
"onUnmounted": true,
"onUpdated": true,
"provide": true,
"reactive": true,
"readonly": true,
"ref": true,
"request": true,
"resolveComponent": true,
"setActivePinia": true,
"setMapStoreSuffix": true,
"shallowReactive": true,
"shallowReadonly": true,
"shallowRef": true,
"storage": true,
"storeToRefs": true,
"toRaw": true,
"toRef": true,
"toRefs": true,
"triggerRef": true,
"unref": true,
"useAttrs": true,
"useCssModule": true,
"useCssVars": true,
"useLink": true,
"useRoute": true,
"useRouter": true,
"useSlots": true,
"watch": true,
"watchEffect": true,
"watchPostEffect": true,
"watchSyncEffect": true
}
}
86 changes: 43 additions & 43 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
module.exports = {
root: true, // 停止向上查找父级目录中的配置文件
env : {
env: {
browser: true,
es2021 : true,
node : true
es2021: true,
node: true,
},
extends: [
'./.eslintrc-auto-import.json', // 引入自动导入插件配置文件
'eslint:recommended', // ESLint 推荐规则
'plugin:vue/vue3-essential', // Vue3 推荐规则
'plugin:@typescript-eslint/recommended', // TypeScript 推荐规则
'plugin:prettier/recommended' // Prettier 推荐规则
'plugin:prettier/recommended', // Prettier 推荐规则
],
parser : 'vue-eslint-parser', // 指定要使用的解析器
parser: 'vue-eslint-parser', // 指定要使用的解析器
parserOptions: {
ecmaVersion: 12, // 支持的 ES 版本,这里是 ECMAScript 2021
sourceType : 'module', // 模块类型,默认为 script,我们设置为 module
parser : '@typescript-eslint/parser' // 使用 TypeScript 解析器
sourceType: 'module', // 模块类型,默认为 script,我们设置为 module
parser: '@typescript-eslint/parser', // 使用 TypeScript 解析器
},
plugins: ['vue', '@typescript-eslint', 'prettier'], // 引用的插件列表
rules : {
'vue/multi-word-component-names' : 'off', // 关闭多词组件名检测
rules: {
'vue/multi-word-component-names': 'off', // 关闭多词组件名检测
'@typescript-eslint/no-var-requires': 'off', // 关闭 require 导入警告
'prettier/prettier' : [
'prettier/prettier': [
'off',
{
printWidth : 120,
tabWidth : 4,
useTabs : false,
semi : true,
singleQuote : true,
quoteProps : "as-needed",
jsxSingleQuote : false,
trailingComma : "all",
bracketSpacing : true,
jsxBracketSameLine : false,
arrowParens : "always",
requirePragma : false,
insertPragma : false,
proseWrap : "preserve",
htmlWhitespaceSensitivity: "css",
endOfLine : "auto"
}
printWidth: 120,
tabWidth: 4,
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: 'as-needed',
jsxSingleQuote: false,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'always',
requirePragma: false,
insertPragma: false,
proseWrap: 'preserve',
htmlWhitespaceSensitivity: 'css',
endOfLine: 'auto',
},
],
"comma-dangle" : ["warn", "never"],
eqeqeq : "warn",
"arrow-parens" : 0,
"generator-star-spacing": 0,
'comma-dangle': ['warn', 'never'],
eqeqeq: 'warn',
'arrow-parens': 0,
'generator-star-spacing': 0,

"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',

indent : [1, 4, { SwitchCase: 1 }],
"space-before-function-paren": ["warn", "never"],
"no-constant-condition" : ["warn"],
"no-empty" : ["off"],
"comma-spacing" : ["warn", { after: true }],
"key-spacing" : [
"warn",
indent: [1, 4, { SwitchCase: 1 }],
'space-before-function-paren': ['warn', 'never'],
'no-constant-condition': ['warn'],
'no-empty': ['off'],
'comma-spacing': ['warn', { after: true }],
'key-spacing': [
'warn',
{
singleLine: {},
multiLine : { align: "colon" }
}
]
}
multiLine: { align: 'colon' },
},
],
},
};
9 changes: 3 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@

## [1.2.1](https://github.com/School-of-Website-Engineering/Vue3-project-template/compare/v1.2.0...v1.2.1) (2023-03-10)


### update

* 更新axios ([806da97](https://github.com/School-of-Website-Engineering/Vue3-project-template/commit/806da979feecdc7aad71c14b03da1a4174dcfd32))
- 更新 axios ([806da97](https://github.com/School-of-Website-Engineering/Vue3-project-template/commit/806da979feecdc7aad71c14b03da1a4174dcfd32))

## [1.2.0](https://github.com/School-of-Website-Engineering/Vue3-project-template/compare/v1.1.0...v1.2.0) (2023-03-06)


### Features

* 添加husky,代码提交时执行风格检测修复 ([3f99024](https://github.com/School-of-Website-Engineering/Vue3-project-template/commit/3f99024e4e6100aeb28ec46f0b6fe2e62c628842))
- 添加 husky,代码提交时执行风格检测修复 ([3f99024](https://github.com/School-of-Website-Engineering/Vue3-project-template/commit/3f99024e4e6100aeb28ec46f0b6fe2e62c628842))

## [1.1.0](https://github.com/School-of-Website-Engineering/Vue3-project-template/compare/v1.0.0...v1.1.0) (2023-03-05)


### Features

* 修复打包错误 ([1934b98](https://github.com/School-of-Website-Engineering/Vue3-project-template/commit/1934b9802dd49c84236c9d0f572bba6432607f25))
- 修复打包错误 ([1934b98](https://github.com/School-of-Website-Engineering/Vue3-project-template/commit/1934b9802dd49c84236c9d0f572bba6432607f25))
32 changes: 16 additions & 16 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Vue3-project-template

<!-- ![](https://img.shields.io/badge/%E7%8A%B6%E6%80%81-%E7%BB%B4%E6%8A%A4%E4%B8%AD-brightgreen) -->
<!--![](https://img.shields.io/badge/%E7%8A%B6%E6%80%81-%E5%B0%B1%E7%BB%AA-orange)-->
<!--![](https://img.shields.io/badge/%E7%8A%B6%E6%80%81-%E5%AE%8C%E6%88%90-brightgreen)-->
Expand All @@ -11,27 +12,26 @@
![](https://img.shields.io/badge/Vite-%20%5E4.1.4-brightgreen)
![](https://img.shields.io/badge/npm-%5E9.5.1-blue)


## 项目简介

Vue3-project-template 为了方便开发者快速搭建 Vue3 项目,提供了一个基础的 Vue3 项目模板,该模板集成了 Vue3、Vite、Vue-router、Vuex、Element-plus、Axios、Eslint、Prettier、Commitizen、Commitlint、Husky、Lint-staged 等常用的工具,开发者只需要在该模板上进行开发即可。

<h2>内容列表</h2>

- [Vue3-project-template](#vue3-project-template)
- [项目简介](#项目简介)
- [Git 规范](#git-规范)
- [Git 分支命名](#git-分支命名)
- [Git Commit Message 格式](#git-commit-message-格式)
- [type 提交类型:](#type-提交类型)
- [subject 提交描述](#subject-提交描述)
- [相关仓库](#相关仓库)
- [维护者](#维护者)
- [如何贡献](#如何贡献)
- [贡献者](#贡献者)
- [快速上手](#快速上手)
- [特别感谢:](#特别感谢)
- [使用许可](#使用许可)
- [Vue3-project-template](#vue3-project-template)
- [项目简介](#项目简介)
- [Git 规范](#git-规范)
- [Git 分支命名](#git-分支命名)
- [Git Commit Message 格式](#git-commit-message-格式)
- [type 提交类型:](#type-提交类型)
- [subject 提交描述](#subject-提交描述)
- [相关仓库](#相关仓库)
- [维护者](#维护者)
- [如何贡献](#如何贡献)
- [贡献者](#贡献者)
- [快速上手](#快速上手)
- [特别感谢:](#特别感谢)
- [使用许可](#使用许可)

## Git 规范

Expand Down
Loading