raygun4node
raygun4node copied to clipboard
ci: Prettier setup
ci: Prettier setup
Description :memo:
-
Purpose: Enforces code formatting using the
prettier
command. -
Approach: Runs the
prettier
command in dry mode in pull-requests.
Type of change
- [x] New feature (non-breaking change which adds functionality)
Updates
- Add
prettier
job to thenode.js.yml
GitHub Actions config file. - Add examples to the
prettier
command inpackages.json
TODO: Run prettier on all files to fix current formatting issues. I will have to do this when all current open PRs are merged.
Test plan :test_tube:
- We will see the results on new PRs opened.
Author to check :eyeglasses:
- [ ] Project and all contained modules builds successfully
- [ ] Self-/dev-tested
- [ ] Unit/UI/Automation/Integration tests provided where applicable
- [ ] Code is written to standards
- [ ] Appropriate documentation written (code comments, internal docs)
Reviewer to check :heavy_check_mark:
- [ ] Project and all contained modules builds successfully
- [ ] Change has been dev-/reviewer-tested, where possible
- [ ] Unit/UI/Automation/Integration tests provided where applicable
- [ ] Code is written to standards
- [ ] Appropriate documentation written (code comments, internal docs)
This is what we will see when the code is not correctly formatted
Could you please clarify why we can't do fetch-depth: 1
please
Could you please clarify why we can't do fetch-depth: 1 please
Although the prettier GitHub Action asked for it, I ended up removing it and it still seems to work.
I think it is only necessary if we wanted to apply prettier only to the changes done, and not the whole codebase, so it doesn't seem to be necessary in our case.