Skip to content

chore: format codebase with prettier and fix markdownlint issues - #114

Open
Fahad090NP wants to merge 2 commits into
ltmoerdani:mainfrom
Fahad090NP:chore/format-codemod
Open

chore: format codebase with prettier and fix markdownlint issues#114
Fahad090NP wants to merge 2 commits into
ltmoerdani:mainfrom
Fahad090NP:chore/format-codemod

Conversation

@Fahad090NP

Copy link
Copy Markdown
Contributor

What

Baseline formatting cleanup for the repo now that the husky/lint-staged pre-commit hook is live (#110). Makes git blame and git bisect clean going forward and unblocks the pre-commit tripwire.

1. Prettier format (whole codebase)

2. Markdownlint fixes (npm run lint:md: 2219 → 0 issues)

  • Config (.markdownlint.json): disable rules that conflict with repo conventions:
    • MD033 inline HTML (README badges/<details>, docs use it intentionally)
    • MD041 first-line heading (docs template starts with **Status:** before the H1)
    • MD060 table column style (prettier already handles table alignment)
    • MD024 set to siblings_only (still catches real dup headings, allows Keep-a-Changelog's repeated ### Fixed / ### Added)
  • Code fences: added text / md language tags to 51 bare fences (ASCII diagrams, log dumps, templates)
  • Tables: escaped literal | pipes inside inline code (were splitting table cells — real rendering bug)
  • Fixes: merged a duplicate ### Changed in CHANGELOG, fixed a README heading level, converted emphasis-as-heading to bold

Verification

  • npm run lint:md → 0 issues (72 files)
  • npx prettier --check . → all files pass

Notes

@Fahad090NP

Copy link
Copy Markdown
Contributor Author

Note

Pure formatting + markdownlint cleanup — no logic changes (git blame/git bisect friendly codemod).
A follow-up PR #115 fixes the remaining 45 ESLint errors and is stacked on this branch, so its diff temporarily includes these changes too.
Merge order: #114 first, then #115. #115's diff will shrink to its own 10 files automatically after this merges.

@ltmoerdani

Copy link
Copy Markdown
Owner

Thanks @Fahad090NP nice work on this. I pulled the branch and checked it locally, here's what I found:

  • prettier --check passes, npm run lint:md is clean at 0 issues
  • compile passes, and all 138 unit tests come back green
  • I ran prettier on the merge-base and compared file-by-file against your branch, all source files match. So the diff is genuinely formatting only, no logic changes hiding in there
  • the markdown edits are all legitimate fixes too, the code fence language tags, the duplicate ### Changed in CHANGELOG, the heading levels

One thing to sort out before this can merge though. The branch sits on an older main. Since it was created, main has moved 6 commits forward, including PR #113 (bridge hardening) which touches the same files you reformatted, extension.ts, streaming.ts, goUsageTracker.ts, metadata.ts, retry.ts, and the proposed .d.ts files among others. I ran a test merge and got 15 conflicted files, so it can't go in as-is.

Could you rebase onto the latest main, then re-run npm run format and npm run lint:md and force-push? That should resolve the conflicts and keep git blame clean, which is the whole point of this PR.

Once that lands, #115 will shrink to its own files automatically, like you mentioned.

No rush. Happy to take another look after the rebase.

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.

2 participants