Skip to content

Enforce consistent code formatting across codebase with Prettier #39

@rishabh3562

Description

@rishabh3562

Apply Prettier formatting to the entire codebase to ensure consistent code style.

Problem

The codebase currently has inconsistent formatting:

  • Mixed quote styles (single vs double)
  • Inconsistent indentation
  • Varying line endings
  • Different semicolon usage

This makes code reviews harder and can cause unnecessary git diffs.

Proposed Solution

Run Prettier on all files to establish consistent formatting:

npx prettier --write "**/*.{js,jsx,ts,tsx,json,css,md}"

Files Affected

Approximately 115 files will be reformatted:

  • All TypeScript/JavaScript files
  • All React components
  • All markdown documentation
  • All JSON configuration files
  • All CSS files

Note: These are purely cosmetic changes - no functionality will be affected.

Benefits

  • ✅ Consistent code style across project
  • ✅ Easier code reviews (no style debates)
  • ✅ Better git diffs (only meaningful changes)
  • ✅ Professional appearance
  • ✅ Easier for new contributors

Context

This work was originally part of PR #35 but was split out to keep CI/CD changes (PR #38 ) focused and easier to review.

Tasks

  • Run Prettier on all files
  • Verify no functionality changes (run tests)
  • Create PR with formatting changes
  • Add .prettierrc configuration file (optional)
  • Update CONTRIBUTING.md with formatting guidelines

Implementation Details

Command to Run

npx prettier --write "**/*.{js,jsx,ts,tsx,json,css,md}"

Verification

# Ensure formatting is correct
npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}"

# Ensure build still works
npm run build

# Ensure tests pass (if any)
npm test

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions