Skip to content

[Improvement] Add ESLint and Prettier configuration to the frontend #16

Description

@grantfox-oss

Getting Started

  1. Fork the repository: https://github.com/JointSave-org/Joint_Save
  2. Clone your fork:
   git clone https://github.com/<your-username>/Joint_Save.git
   cd Joint_Save
  1. Create a new branch:
   git checkout -b chore/eslint-prettier-setup

Overview

The frontend has no Prettier config and minimal ESLint rules beyond Next.js defaults. This leads to inconsistent formatting across contributions.

Requirements

ESLint

  • Add @typescript-eslint/recommended, react-hooks/rules-of-hooks, react-hooks/exhaustive-deps
  • Set no-console to warn, @typescript-eslint/no-explicit-any to error

Prettier — frontend/.prettierrc

{ "semi": false, "singleQuote": false, "tabWidth": 2, "trailingComma": "es5", "printWidth": 100 }

package.json Scripts

"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix",
"format": "prettier --write .",
"format:check": "prettier --check ."

CI

Update .github/workflows/test.yml to run npm run lint and npm run format:check on every PR.

Acceptance Criteria

  • npm run lint passes with no errors
  • npm run format:check passes
  • CI fails the PR if lint or format check fails
  • CONTRIBUTING.md updated to mention running lint before committing

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions