Skip to content

Latest commit

 

History

History
77 lines (51 loc) · 1.9 KB

README.zh-CN.md

File metadata and controls

77 lines (51 loc) · 1.9 KB

vue-cli-plugin-norm

帮助你快速地对项目建立起全自动的代码风格校验,以及Git提交规范,支持 Vue 及 React 项目.

English / 简体中文

你的 vscode 需要安装以下插件:prettier eslint

代码校验已支持 Vue2/3 + TS 的项目.

插件有如下特性: 不在 Commit 时校验规则,而是每次保存文件时自动校验及格式化,包括可能存在的一些 auto fix(会自动修复掉).

开始之前

目前依赖 Vue-cli,全局安装即可,即使你不使用 Vue

npm install -g @vue/cli
# OR
yarn global add @vue/cli

在你的项目上使用命令:

vue add vue-cli-plugin-norm

开始使用!

提交代码:

npm run c 或 npm run commit

查看提交的历史日志:

npm run clog

本项目基于 alloyteam 团队使用的规范,你也可以根据情况自定义规则,参考文档:ESlint reference Doc.

卸载

yarn remove commitizen commitlint conventional-changelog-cli husky right-pad

yarn remove babel-eslint eslint eslint-plugin-vue vue-eslint-parser eslint-config-alloy

删除根目录下的 commitlint.config.js .eslintrc.js .prettierrc.js