chore: add Prettier configuration file (.prettierrc) - #152
Conversation
| @@ -0,0 +1,6 @@ | |||
| { | |||
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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:
prettieradded todevDependencies(e.g."prettier": "^3.x")- A
formatscript:prettier --write . - A
format:checkscript:prettier --check .— useful for CI
Without these, the config file ships but does nothing, and developers won't know how to invoke it.
|
Hey @vansh7nvc — one blocker to fix before this can merge: |
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.
Summary
Closes #58 — adds a Prettier configuration file (
.prettierrc) to the repository root.Changes
1.
.prettierrc