帮助你快速地对项目建立起全自动的代码风格校验,以及Git提交规范,支持 Vue 及 React 项目.
English / 简体中文
代码校验已支持 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