Skip to content

chore: add .prettierignore so editor formatting skips generated and vendored files (Closes #48) - #160

Merged
harsharajkumar-273 merged 1 commit into
harsharajkumar-273:mainfrom
SakethSumanBathini:chore/48-prettierignore
Jul 29, 2026
Merged

chore: add .prettierignore so editor formatting skips generated and vendored files (Closes #48)#160
harsharajkumar-273 merged 1 commit into
harsharajkumar-273:mainfrom
SakethSumanBathini:chore/48-prettierignore

Conversation

@SakethSumanBathini

@SakethSumanBathini SakethSumanBathini commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes #48

Problem

There is no .prettierignore at the repository root.

Prettier is not a build dependency in this repo — it is not in package.json, frontend/package.json or backend/package.json, and there is no format script. It reaches contributors through the esbenp.prettier-vscode extension that .devcontainer/devcontainer.json installs (line 23).

That means anyone developing in the devcontainer has Prettier active as an editor formatter with nothing telling it what to leave alone. "Format Document" or format-on-save will happily rewrite package-lock.json, frontend/dist/, the vendored test-repo/ PreTeXt fixture, and the tracked backend/dev.db, producing large unrelated diffs that reviewers then have to separate from the actual change.

Change

Adds .prettierignore, mirroring the paths already excluded by .gitignore and .dockerignore, plus three categories those two do not need to cover:

  • lockfiles (regenerated by npm, never hand-formatted)
  • Prisma migrations and the tracked backend/dev.db
  • the vendored test-repo/ fixture, which is upstream content

Scope

This is editor-level only. Prettier is not wired into CI or any npm script, so this PR does not change any build, lint or test behaviour — it only stops the editor integration from reformatting files that are not ours to reformat. If Prettier is later adopted as a real dependency with a format script, this file is already the correct ignore set for it.

Verification

No runtime code touched; no build, test or lint behaviour changes.

Summary by CodeRabbit

  • Chores
    • Added repository-wide formatting exclusions for dependencies, generated files, build outputs, local configuration, test artifacts, and binary assets.
    • Prevented automated formatting from modifying migration files, databases, logs, and other non-formattable files.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 59597e0e-6c38-4c31-bffc-b43e1585b450

📥 Commits

Reviewing files that changed from the base of the PR and between 2f06e6e and e53c79e.

📒 Files selected for processing (1)
  • .prettierignore
📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: test
🔇 Additional comments (1)
.prettierignore (1)

1-76: LGTM!


📝 Walkthrough

Walkthrough

Adds a root .prettierignore covering dependencies, generated outputs, local runtime and database files, fixtures, coverage, logs, and binary assets.

Changes

Prettier ignore configuration

Layer / File(s) Summary
Repository artifact exclusions
.prettierignore
Adds ignore rules for dependency directories, lockfiles, build and test outputs, logs, environment files, Prisma and local database artifacts, vendored fixtures, coverage, and binary assets.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested labels: ELUSOC, NEWBIE

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a root .prettierignore for generated and vendored files.
Linked Issues check ✅ Passed The new .prettierignore includes all five directories requested by issue #48.
Out of Scope Changes check ✅ Passed The additional ignore rules still relate to skipping generated, local, or vendored artifacts and do not appear out of scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added ELUSOC Required Tracking NEWBIE Beginner (10 pts) labels Jul 28, 2026
@harsharajkumar-273
harsharajkumar-273 merged commit 44cd432 into harsharajkumar-273:main Jul 29, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ELUSOC Required Tracking NEWBIE Beginner (10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exclude build and database artifacts from Prettier formatting

2 participants