-
Notifications
You must be signed in to change notification settings - Fork 6
Development
Samuel Ping edited this page May 12, 2021
·
3 revisions
The general process for contributing to Sledge is as follows:
- You have been assigned to work on a feature.
- Create and checkout a new branch for your feature.
- Make your changes to the code.
- Write a test for your changes, if applicable.
- Run
npm run lint
to run ESLint and see what changes you need to make.- Note: To test a specific file, you can run
npx eslint <your file>
.
- Note: To test a specific file, you can run
- Run
npm test
to test your code. - If everything looks good, push your changes to your branch.
- When you're done making changes, in GitHub, make a pull request to merge your branch into
env/dev
. - Notify and wait for someone to review your code (usually project lead).
- If they request changes, repeat steps 3-7.
- Note: Your pull request will automatically be updated with your new changes on your branch.
- If not, they'll approve merge your changes!
Notes:
- Getting the latest changes from the repository's main branch (
env/dev
)- To get the latest changes, you need to first pull the changes from GitHub, then merge them into your own branch. To do so:
-
git checkout env/dev
: Move toenv/dev
branch. -
git pull origin env/dev
: Pull latest changes on this branch from GitHub. -
git checkout <your branch>
: Move to your branch. -
git merge --no-ff env/dev
: Merge the changes fromenv/dev
into your branch. - If you get any merge conflicts, be sure to fully resolve them!
-
- To get the latest changes, you need to first pull the changes from GitHub, then merge them into your own branch. To do so:
- If you have any questions or issues, do not hesitate to reach out and ask your project lead!
We use ESLint and Prettier to automatically format and lint our code. At the moment, we follow Airbnb's JavaScript Style Guide.
- To run ESLint, run
npm run lint
. - To run ESLint and automatically fix linting errors when possible, run
npm run lint-fix
. - You can also run ESLint by running
npx eslint <file/directory>
.
- If you run into any linting errors that you need clarification on or don't know how to fix, reading Airbnb's Style Guide will likely help point you in the right direction.
- Ask any questions you might have to your Project Lead!
Testing in the frontend has not been implemented yet.
We use Jest and Supertest to test our backend.
- To run tests locally, simply run
npm test
.
Our GitHub Actions pipeline will also run these tests automatically whenever a push is made to a branch.
Welcome
Using Sledge
Development
Archive