CivicTechJobs
CivicTechJobs copied to clipboard
Add a linting phase to the CI pipeline
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
developormain. - [ ] Create a github action that checks backend PRs for python linting errors before merging it into
developormain.
These two tasks can be separated into two different PRs for convenience.
Resources/Instructions
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
@RSkuma Please provide update
- Progress
- Blockers
- Availability
- ETA
@RSkuma Please provide update
- Progress
- Blockers
- Availability
- ETA
@RSkuma still working on this?
@RSkuma could you please provide update
- Progress
- Blockers
- Availability
- ETA