@@ -16,15 +16,16 @@ commits.
1616Run these commands in each of your sandboxes to enable our pre-commit hooks and commitlint:
1717
1818``` sh
19+ pip install -r requirements.dev.txt
1920pre-commit install
20- npm install
21+ gitlint install-hook
2122```
2223
2324## Pre-commit hooks
2425
2526The ReadAlong Studio team has agreed to systematically use a number of pre-commit hooks to
2627normalize formatting of code. You need to install and enable pre-commit to have these used
27- when you do your own commits.
28+ automatically when you do your own commits.
2829
2930Pre-commit hooks enabled:
3031- check-yaml validates YAML files
@@ -60,11 +61,11 @@ don't forget to do so when you clone a new sandbox!
6061
6162## commitlint
6263
63- The team has also agreed to use commitlint-style commit messages. Install and enable
64- [ commitlint ] ( https://github .com/conventional-changelog/commitlint ) to have your commits
65- validated systematically .
64+ The team has also agreed to use [ Conventional Commits ] ( https://www.conventionalcommits.org/ ) .
65+ Install and enable [ gitlint ] ( https://jorisroovers .com/gitlint/ ) to have your
66+ commit messages scanned automatically .
6667
67- Commitlint commits look like this:
68+ Convential commits look like this:
6869
6970 type(optional-scope): subject (i.e., short description)
7071
@@ -107,32 +108,14 @@ These rules are inspired by these commit formatting guides:
107108
108109### Enabling commitlint
109110
110- We run commitlint on each commit message that you write by enabling the commit-msg hook in
111- Git. It is run via [ husky] ( https://www.npmjs.com/package/husky ) , which is a JS Git hook
112- manager, and you need Node to run it.
113-
114- If you don't already use Node, this is a bit more work to install that the pre-commit
115- hooks above, but please take a moment to do this:
111+ You can run commitlint on each commit message that you write by enabling the
112+ commit-msg hook in Git.
116113
117- - If you don't already use Node or nvm, or if you don't have admin access to the system
118- version of node, install nvm in your ~ /.nvm folder:
119- ``` sh
120- wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
121- ```
122- This will add a few lines to your ` .bashrc ` file, which you'll need to execute now,
123- possibly by starting a new shell.
124-
125- - Install Node:
126- ``` sh
127- nvm install node
128- ```
114+ Run this command in your g2p sandbox to install and enable the commit-msg hook:
129115
130- - In your ReadAlong/Studio sandbox, install the husky commit-msg hook using npm, the node
131- package manager you just installed using nvm. The file ` package.json ` in Studio is what
132- tells npm to install husky as a pre-commit hook, and also what tells husky to invoke
133- commitlint on your commit messages.
134116``` sh
135- npm install
117+ pip install -r requirements/requirements.dev.txt
118+ gitlint install-hook
136119```
137120
138121- Now, next time you make a change and commit it, your commit log will be checked:
0 commit comments