Code Monkey home page Code Monkey logo

articles's Introduction

frontend-commit-template

前端代码风格及commit风格规范化模板

仅供参考,实际使用请参考工程模板

工程模板请参考

代码风格与commit规范工具

  • eslint
  • prettier
  • commitizen
  • cz-customizable
  • commitlint
  • lint-staged
  • husky

项目依赖

npm全局安装commitizen

npm i -g commitizen

构建流程

  1. 代码风格检查 —— 使用eslint对代码进行检查.eslintrc.json
  2. 代码风格修复 —— 使用prettier对代码进行格式化.prettierrc.json
  3. commitizen —— 生成commit参考package.json
  4. cz-customizable —— 自定义commit提交.cz-config.js
  5. husky —— 使用git hooks配合commitlint对commit进行检查,配合lint-staged对文件进行规范化处理.commitlintrc.json

项目使用流程

# clone仓库
git clone

# 删除.git重新绑定.git

# 进入目录安装依赖
yarn

# 提交流程
git add .
npm run commit
git push

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.