Skip to content

chore: add Prettier configuration file (.prettierrc) - #152

Open
vansh7nvc wants to merge 2 commits into
pavanvamsi3:mainfrom
vansh7nvc:chore/add-prettier-config
Open

chore: add Prettier configuration file (.prettierrc)#152
vansh7nvc wants to merge 2 commits into
pavanvamsi3:mainfrom
vansh7nvc:chore/add-prettier-config

Conversation

@vansh7nvc

@vansh7nvc vansh7nvc commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #58 — adds a Prettier configuration file (.prettierrc) to the repository root.

Changes

1. .prettierrc

  • Created the configuration file specifying double quotes, semicolons, and 2-space tab width.

Comment thread .prettierrc
@@ -0,0 +1,6 @@
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .prettierrc config has no effect without prettier installed. It's not in devDependencies and there's no format script in package.json, so developers have no way to actually run it short of npx prettier --write ..

This PR needs at minimum:

// package.json — devDependencies
"prettier": "^3.x"

// package.json — scripts
"format": "prettier --write .",
"format:check": "prettier --check ."

format:check is also worth wiring into CI alongside the upcoming typecheck step (#65) so formatting drift is caught automatically.

@kannupriyakalra kannupriyakalra left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

Verdict: Request changes — 1 error.

What's good

  • The config values match the existing code style: double quotes, semicolons, 2-space indentation, ES5 trailing commas — no churn on existing files when Prettier runs.

Error

prettier package is missing
The .prettierrc config file is inert without prettier installed. It's absent from both devDependencies and scripts in package.json, so there's no way to actually run it. The PR needs:

  1. prettier added to devDependencies (e.g. "prettier": "^3.x")
  2. A format script: prettier --write .
  3. A format:check script: prettier --check . — useful for CI

Without these, the config file ships but does nothing, and developers won't know how to invoke it.

@kannupriyakalra

Copy link
Copy Markdown
Collaborator

Hey @vansh7nvc — one blocker to fix before this can merge: prettier isn't installed and there's no format script, so the .prettierrc config has no effect. See the inline comment for the exact changes needed in package.json. Quick fix — should only take a couple of minutes!

Address reviewer feedback by actually installing the `prettier` package as
a dev dependency, and adding `format` and `format:check` npm scripts to
make the configuration usable and enforceable in CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: add Prettier config for consistent code formatting

2 participants