C83 / THP_2.0

0 stars 0 forks source link

Add Husky #7

Closed C83 closed 6 years ago

C83 commented 6 years ago

Why ?

Husky is a tool to run commands before each commit and push. It block a commit/push if everything is not perfect.

We are all lazy. Husky helps us by forcing us to keep our code base clean and tested.

Must have

C83 commented 6 years ago
  1. node -v => ok
  2. yarn --version => yarn installed
  3. $ yarn add husky --dev
  4. Annotate add comments on the top of files. Repo here. To install : gem 'annotate' then bundle install. Using it with annotate command.
  5. Et 6. :
    "scripts": {
    "precommit": "rubocop -a && annotate",
    "prepush": "rubocop -a && rpsec && annotate"  
    }
  6. Add nodes_modules/* in .gitignore