Git Product home page Git Product logo

commitlint-config-uphold's Introduction

commitlint-config-uphold

Shareable commitlint config enforcing Uphold's commit conventions.

Status

npm version build status

Motivation

This package ensures our commits follow our standard:

  1. Header must not exceed 72 characters.
  2. Header must start with a verb in the simple present tense (imperative mood).
  3. Header must be sentence-cased, meaning it must start with an uppercase letter.
  4. Header must not end with a full-stop.
  5. Body can make use of all verb tenses.

Installation

❯ npm i commitlint-config-uphold --save-dev

or with Yarn:

❯ yarn add commitlint-config-uphold --dev

Usage with commitlint

Create .commitlintrc.yml with:

extends: "@uphold/commitlint-config"

Verbs detection

Verbs are detected using data from Wordnet provided by wordnet package.

The wordnet database is large with more than 28 megabytes because it contains all the english words, including their definitions. To provide the smallest package possible, there's a script that generates a JSON file that contains the extracted english verbs from wordnet. To update the generated JSON whenever wordnet releases a new version, run:

❯ yarn update-wordnet-verbs

⚠️ The detection algorithm simply checks if the first word is an english word that may be used as a verb (in the simple-present tense). It does not account if the word is actually a verb in the context of the phrase. It would be possible to detect if it's actually used as a verb by using natural language processing techniques. However, they often give bad results.

License

MIT

commitlint-config-uphold's People

Contributors

satazor avatar diogotorres97 avatar

Stargazers

 avatar

Watchers

Asaf Zamir avatar Miguel Martins avatar Rui Marinho avatar Shaun Finglas avatar Tiago Ribeiro avatar Pedro Peixoto avatar Sandro Machado avatar Francesco Lentini avatar Pedro Gomes avatar Luis Oliveira avatar André Coelho avatar Tiago Leite avatar Francisco Silva avatar Prasanjit Mohanty avatar  avatar Justin Weathersby avatar Cristiano Oliveira avatar Rafael Santos avatar João Spranger avatar  avatar Sergio Pinheiro avatar André Gonçalves avatar André Valente avatar Dave Salomon avatar  avatar Miguel Brito avatar Leonardo Coelho avatar Filipe Martins avatar Rui Neves avatar  avatar Aleksandar Djordjevic avatar João Fonseca avatar André Pinto avatar Marcelo Lima avatar  avatar Ana Isabel Castro avatar Joel Gama avatar  avatar Bartosz Zarzecki 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.