Git Product home page Git Product logo

commitlint-with-husky's Introduction

No-Sweat™ Commitlint and Husky Setup

This is my attempt at setting up a project/repo with Commitlint and Husky as fast as possible.

What it does

  • Commitlint (you guessed it) lints your comments based on conventional commits' Standards
  • Husky uses githooks to lint the commits before they are actually executed (pre-commit hook)

You are very welcome to overwrite any of these settings, or just fork the entire thing to create your own.

Installing

  1. If you don't already have a package.json file, create one with npm init.

  2. Then ensure you have a .git folder create one with git init.

  3. In the root of your project execute the following command in your terminal:

npm i commitlint-with-husky --save-dev

The configuration files will be added to your project by the postinstall script:

  1. You can see in your package.json there are now 2 scripts added to your script property if you should need it. You can install pinst on your own.
  "scripts": {
  "your other scripts":"..."

    "postpublish": "pinst --disable",
    "prepublishOnly": "pinst --enable "
  },

Notice

I work on a windows machine, to the best of my knowledge the package works on all platforms, if not please don't hesitate to let me know.

Enjoy!

MIT

commitlint-with-husky's People

Contributors

clickwithclark 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.