Giter Site home page Giter Site logo

lint-commits's Introduction

PACKAGES

commitlint

é tipo um eslint pra padronizar mensagens de commit

cz-cli

é uma interface de linha de comando, um software que cria uma interface mais
visual na hora de criar o commit. Ele cria um menu, por meios de perguntas, 
e no final é montado automaticamente a mensagem de commit.

husky

O husky nos permite criar funcionalidados automatizadas baseado em comandos do GIT.

PRATICA

1 - INSTALAR O commitlint cli e a configuracao do conventional

yarn add @commitlint/config-conventional @commitlint/cli -D

2 - CONFIGURAR O COMMITLINT P/ USAR A CONFIGURAÇÃO DO CONVENTIONAL

echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js

3 - ADD O HUSKY P/ INFORMAR PRO COMMITLINT QUE ELE PRECISA SER EXECUTADO DEPOIS DO COMMIT (git commit)

yarn add husky -D

4 - ADD O COMMITZEN

yarn add commitizen -D

5 - EXECUTAR O COMANDO P/ INICIAR O COMMITZEN

yarn commitizen init cz-conventional-changelog --yarn --dev --exact

6 - INICIAR O COMMITZEN

yarn commitizen init

7 - CONFIGURAR P/ EXECUTAR O COMMITZEN SER EXECUTADO SEMPRE QUE DER UM git commit

  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
      "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true"
    }
  }

8 - AGORA É SO DAR UM NOVO COMMIT E ESTARA FUNCIONANDO... OU NÃO!

git add .
git commit

REFERENCIES

[https://www.youtube.com/watch?v=erInHkjxkL8] - ROCKETSEAT YOUTUBE [https://github.com/conventional-changelog/commitlint] - DOCUMENTATION COMMITLINT [https://commitlint.js.org/#/] - COMMITLINT SITE [conventionalcommits.org/en/v1.0.0/] - CONVEnTIONAL COMMITS [https://github.com/commitizen/cz-cli] - DOCUMENTATION COMMITZEN (cz-cli)

OBS

O commitlint changelog foi criado pela comunidade do Angular. É o padrão utilizado pela maioria.

Types commits

`build`: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
`ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
`docs`: Documentation only changes
`feat`: A new feature
`fix`: A bug fix
`perf`: A code change that improves performance
`refactor`: A code change that neither fixes a bug nor adds a feature
`style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
`test`: Adding missing tests or correcting existing tests

lint-commits's People

Contributors

vinicius-evocorp avatar

Watchers

 avatar

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.