Skip to content

Instantly share code, notes, and snippets.

@marcodotcastro
Last active May 13, 2021 23:30
Show Gist options
  • Save marcodotcastro/a522200058d316a60d0ef9c0015085d9 to your computer and use it in GitHub Desktop.
Save marcodotcastro/a522200058d316a60d0ef9c0015085d9 to your computer and use it in GitHub Desktop.
Configurações Semantic Commit

Como usar Semantic Commit?

O que é?

Terminal

  • npm install --global commitizen

Adicionar package.json no projeto

  • commitizen init cz-conventional-changelog --save-dev --save-exact

Usando

  • git cz
  • cz

VS Code

Plugin

  • Commit Message Editor

Validar Commit

  • npm install --save-dev husky @commitlint/cli @commitlint/config-conventional
  • commitlint.config.js
module.exports = {
  extends: ['@commitlint/config-conventional']
};
  • package.json
{
  ...,
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
     }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment