Skip to content

ISSUE-003: CI/CD & Code Quality. #9

@ISONIC0788

Description

@ISONIC0788

What to build

To ensure high code quality and consistent formatting across all contributors, we need to implement a strict code quality pipeline.

This task involves adding ESLint and Prettier for local formatting, setting up Husky to prevent bad commits, and creating a GitHub Action that automatically runs these checks whenever a Pull Request is opened.

Files to create/modify

  • package.json (Modify)
  • .eslintrc.json (Create)
  • .prettierrc (Create)
  • .github/workflows/ci.yml (Create)

Specs

  • Linter: Standard ESLint rules for Node.js (ES Modules).
  • Formatter: Prettier (single quotes, trailing commas).
  • Automation: GitHub Actions should run npm install and npm run lint on PRs to the main branch.

Acceptance criteria

  • Install eslint, prettier, and husky as devDependencies.
  • Create an .eslintrc.json configured for ES Modules.
  • Create a .prettierrc file.
  • Add "lint" and "format" scripts to package.json.
  • Configure Husky with a pre-commit hook that runs the linter before allowing a commit.
  • Create .github/workflows/ci.yml that triggers on pull_request and runs the linter.
  • Test the pipeline locally by intentionally writing poorly formatted code and ensuring the commit fails.

Dependencies

  • ISSUE-001 (Must be able to install and run the project first).

Metadata

Metadata

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions