CivicTechJobs icon indicating copy to clipboard operation
CivicTechJobs copied to clipboard

Add a linting phase to the CI pipeline

Open LoTerence opened this issue 8 months ago • 4 comments

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

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

LoTerence avatar Apr 13 '25 01:04 LoTerence

@RSkuma Please provide update

  1. Progress

  2. Blockers

  3. Availability

  4. ETA

kcoronel avatar May 06 '25 22:05 kcoronel

@RSkuma Please provide update

  1. Progress

  2. Blockers

  3. Availability

  4. ETA

brandonhu8 avatar Jun 03 '25 21:06 brandonhu8

@RSkuma still working on this?

kcoronel avatar Aug 14 '25 14:08 kcoronel

@RSkuma could you please provide update

  1. Progress

  2. Blockers

  3. Availability

  4. ETA

kcoronel avatar Aug 27 '25 02:08 kcoronel