hackforla / hackforla/CivicTechJobs
Add a linting phase to the CI pipeline
- Dominant language
- TypeScript
- Stars
- 24
- Forks
- 27
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
### Story
As developers, we should collaboratively ensure that all new code is properly linted before merging it into the `main` or `develop` branch.
### Overview
Objective: Create a github action that checks new PRs for linter errors before merging it into `develop` or `main`.
We are going to do this instead of using git pre-comit hooks.
- In my personal opinion, pre-commit hooks are slow and can be disruptive to a developers workflow. It can take up to 3-5 seconds just to complete a commit.
- If a developer already has eslint extension on vscode (or other personal linter) set to format code on save, the pre-commit approach is redundant.
- Instead, we should check for linter errors at the Pull Request step. If this check catches any errors, it can remind the developer to run the linters before merging the PR.
- context: needed to remind dev to lint their PR here: #668
### Action Items
- [ ] Create a github action that checks frontend PRs for eslint errors before merging it into `develop` or `main`.
- [ ] Create a github action that checks backend PRs for python linting errors before merging it into `develop` or `main`.
These two tasks can be separated into two different PRs for convenience.
### Resources/Instructions
- [Resources](https://hackforla.github.io/CivicTechJobs/resources/)
Linting docs:
- https://hackforla.github.io/CivicTechJobs/developer/backend/#linting-the-backend
- https://hackforla.github.io/CivicTechJobs/developer/frontend/#eslint-configuration-documentation-for-frontend-developers
Contributor guide
Assessment
This issue has not been assessed yet.