You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,18 @@ Note: Understanding how git remotes work will make collaborating much easier. Yo
137
137
138
138
-_Please note that the `ports` for the frontend and backend are set in this location_
139
139
140
+
1. Set up Husky for Git hooks (required for all contributors):
141
+
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`).
143
+
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:
145
+
146
+
```sh
147
+
npx husky install
148
+
```
149
+
150
+
If you encounter issues, see the [Husky documentation](https://typicode.github.io/husky/#/) or reach out on Slack!
151
+
140
152
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.
141
153
142
154
1. Start the local development servers (frontend & backend).
@@ -211,13 +223,20 @@ You will create a new branch for each issue you work on. Doing all your work on
211
223
git checkout -b your-branch-name
212
224
```
213
225
214
-
### **3.2.1 Check for and resolve code errors before making changes**
226
+
### **3.2.1 Check for and resolve linting/prettier errors before making changes**
215
227
216
228
Before you begin working on any part of a file, always check for existing code errors in the codebase. This helps prevent introducing new issues and ensures a stable foundation for your work.
217
229
218
-
- Use your code editor's error checking tools or run the appropriate linting/compilation commands (e.g., `yarn lint`, `npm run lint`, or your IDE's error panel) to identify any errors in the files you plan to edit.
219
-
- Resolve any errors you find before proceeding with your changes. If you are unsure how to fix an error, ask for help in the team Slack channel or consult the documentation.
230
+
- Use your code editor's error checking tools or run the appropriate linting/compilation commands (e.g., `yarn lint (filename)`, or your IDE's error panel) to identify any errors in the files you plan to edit. (This isn't your fault, it's just an old codebase 🤷️)
231
+
- If you find errors, resolve them in a **separate commit** before starting your feature or fix work. Use a clear commit message such as:
232
+
233
+
> fix: Resolve existing linting and compilation errors
234
+
235
+
(This makes it easier for reviewers to distinguish between error fixes and your new changes.)
236
+
237
+
- If you are unsure how to fix an error, ask for help in the team Slack channel or consult the documentation.
220
238
- Only begin implementing new features or fixes after confirming the file is error-free.
239
+
- If you are unable to resolve the errors after making a reasonable effort, it is acceptable to use `--no-verify` when committing or pushing your changes. Please leave a comment in your pull request explaining why this was necessary.
0 commit comments