Skip to content

tooling: formatting baseline — EditorConfig + Prettier + markdownlint (closes #16)#21

Merged
VijitSingh97 merged 1 commit into
mainfrom
claude/formatting-baseline
Jun 18, 2026
Merged

tooling: formatting baseline — EditorConfig + Prettier + markdownlint (closes #16)#21
VijitSingh97 merged 1 commit into
mainfrom
claude/formatting-baseline

Conversation

@VijitSingh97

Copy link
Copy Markdown
Contributor

Resolves #16 — establishes a formatting/lint baseline so whitespace and style stop being unenforced. Part of the v1.1 site-tooling set, companion to #11.

What this adds

  • .editorconfig — charset / EOL / indent / final-newline / trailing-whitespace across every file surface (web = 2-space, Python = 4, Markdown keeps its hard-break trailing spaces).
  • Prettier 3.8.4 over CSS / JS / JSON / YAML / MD, wired as npm run format[:check].
  • markdownlint-cli2 0.22.1 over Markdown (.markdownlint-cli2.jsonc; line-length / inline-HTML / first-H1 relaxed to fit our README tables and issue templates).
  • CI: a new format job in ci.yml runs prettier --check + markdownlint (Node pinned by SHA — setup-node v6.4.0 — deps via npm ci + committed package-lock.json).
  • Dependabot: added the npm ecosystem alongside github-actions.
  • pre-commit: added prettier + markdownlint hooks, pinned in lockstep with CI.

The one judgment call: Hugo templates excluded from Prettier

The 7 layouts/**/*.html files are Hugo Go-templates ({{ }}). Prettier's HTML parser mangles that syntax, and the whitespace between inline elements there (e.g. the hero title's <span>s) is visually significant — running it risks changing the rendered page. So layouts/ is in .prettierignore; .editorconfig still governs its whitespace. Formatting templates via prettier-plugin-go-template could be a future follow-up once verified against rendered output.

Diff note

The bulk of the diff is a one-time reformat of assets/css/main.css (~1.6k lines) — exactly the "reformat once to a clean baseline" step in the issue. data/content.yaml changes are formatting-only (flow-mapping spacing); every string value is byte-identical.

Verified locally

  • prettier --check . → clean · markdownlint-cli2 → 0 errors
  • Strict Hugo build passes (--panicOnWarning) — reformatted content.yaml + assets render fine
  • zizmor .github/workflows/ → no findings (new Node job included)
  • gitleaks git . → no leaks (incl. the new package-lock.json) · npm ci reproducible

Acceptance (#16)

  • .editorconfig present
  • Prettier + markdownlint run in CI (check mode)
  • Repo reformatted once to a clean baseline

🤖 Generated with Claude Code

…loses #16)

No formatting/lint baseline existed; whitespace and style were unenforced.

- .editorconfig: charset/EOL/indent/final-newline/trailing-whitespace across
  every surface (web 2-space; Python 4; Markdown keeps hard-break spaces).
- Prettier (3.8.4) over CSS/JS/JSON/YAML/MD. The Hugo Go-template layouts are
  deliberately excluded (.prettierignore) — Prettier's HTML parser mangles
  {{ }} and the inline-element whitespace there is visually significant; the
  .editorconfig still governs them. releases.json (generated) is ignored too.
- markdownlint-cli2 (0.22.1) for Markdown (line-length / inline-HTML / first-
  H1 relaxed for our templates).
- Repo reformatted once to a clean baseline (the bulk is a one-time CSS pass).
- CI: new "format" job in ci.yml runs prettier --check + markdownlint (Node
  pinned via SHA, deps via npm ci + package-lock).
- dependabot: add the npm ecosystem alongside github-actions.
- pre-commit: add prettier + markdownlint hooks, pinned in lockstep with CI.

Verified locally: prettier --check clean, markdownlint 0 errors, strict Hugo
build passes (content values unchanged), zizmor clean, npm ci reproducible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@VijitSingh97 VijitSingh97 merged commit 0c15f6e into main Jun 18, 2026
6 checks passed
@VijitSingh97 VijitSingh97 deleted the claude/formatting-baseline branch June 18, 2026 07:07
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.

tooling: formatting baseline (.editorconfig + Prettier + markdownlint)

1 participant