Skip to content

Commit db08901

Browse files
authored
Merge pull request #1963 from trillium/add_husky_script
ci: Add husky script
2 parents 9cd640b + 14cd62d commit db08901

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Once you have accepted the GitHub invite (via email or in your GitHub notificati
4646

4747
1. Setup two factor authentication on your account https://github.com/hackforla/governance/issues/20
4848

49-
These steps are manditory in order to contribute to all HackforLA projects.
49+
These steps are mandatory in order to contribute to all HackforLA projects.
5050

5151
## **Part 2: How to set up the development environment**
5252

@@ -139,15 +139,15 @@ Note: Understanding how git remotes work will make collaborating much easier. Yo
139139

140140
1. Set up Husky for Git hooks (required for all contributors):
141141

142-
To help enforce code quality and prevent errors from being committed, we use [Husky](https://typicode.github.io/husky/) to manage Git hooks. Please follow these steps after installing dependencies:
142+
To help enforce code quality and prevent errors from being committed, we use [Husky](https://typicode.github.io/husky/) to manage Git hooks. Husky should install itself automatically after you install dependencies (thanks to the `prepare` script in `package.json`).
143143

144-
- In the root of the project, run:
144+
If you notice that Git hooks are not working (for example, you don't see linting or formatting checks when committing), you may need to set up Husky manually. To do this, run the following in the root of the project:
145145

146-
```sh
147-
npx husky install
148-
```
146+
```sh
147+
npx husky install
148+
```
149149

150-
- If you encounter issues, see the [Husky documentation](https://typicode.github.io/husky/#/) or reach out on slack!
150+
If you encounter issues, see the [Husky documentation](https://typicode.github.io/husky/#/) or reach out on Slack!
151151

152152
1. Take a second to review the `app.js` and `server.js` files in the `vrms/backend` folder. These two files are a blueprint for the back end, so please familiarize yourself with it. You'll see folders for the database collection models, routes for the API, and a config file which loads the necessary environment variables.
153153

@@ -176,7 +176,7 @@ To run all of the tests run `npm run test:all` from the root folder.
176176

177177
### **2.5 Using the development database**
178178

179-
The application uses MongoDB. We have created a shared development database using MongoDB Cloud and MongoDB Atlas. The conection string for the development database is included in the environmental variables that you pasted into your backend/.env file in step 5 of the "Get Up and Running" setion. If you completed that step successfully you should not need to do anything else.
179+
The application uses MongoDB. We have created a shared development database using MongoDB Cloud and MongoDB Atlas. The connection string for the development database is included in the environmental variables that you pasted into your backend/.env file in step 5 of the "Get Up and Running" section. If you completed that step successfully you should not need to do anything else.
180180

181181
To view and edit the development database manually, you can download [MongoDB Compass](https://www.mongodb.com/try/download/compass). To connect to the development database you will use the "DATABASE_URL" from the [document](https://docs.google.com/document/d/1yDF6UmyO-MPNrl3y_Mw0mkm_WaixlSkXzWbudCzHXDY/edit?usp=sharing) that contained the environmental variables. The string will start with "mongodb+srv://".
182182

@@ -270,7 +270,7 @@ git commit -m "your commit message"
270270
4. Fill out the "What changes did you make and why?" section of the pull request template
271271
5. Include before & after images with your pull request if there are visual changes to the user interface
272272
6. Request a review from another developer on the team
273-
7. Review another developers pull request while you are waiting for your pull request to be reviewed
273+
7. Review another developer's pull request while you are waiting for your pull request to be reviewed
274274

275275
## **Part 5: How to review pull requests**
276276

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"test:cy": "dotenv -e ./backend/.env -e ./client/.env cross-var start-test dev:api %BACKEND_PORT% dev:client %CLIENT_PORT% cy:run",
1616
"test:backend": "cd backend && npm run test",
1717
"test:client": "cd client && npm run test",
18-
"test:all": "cross-env NODE_ENV=test npm run test:client && npm run test:backend"
18+
"test:all": "cross-env NODE_ENV=test npm run test:client && npm run test:backend",
19+
"prepare": "husky install"
1920
},
2021
"dependencies": {
2122
"@mui/icons-material": "^5.14.19",

0 commit comments

Comments
 (0)