tooling: formatting baseline — EditorConfig + Prettier + markdownlint (closes #16)#21
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).npm run format[:check]..markdownlint-cli2.jsonc; line-length / inline-HTML / first-H1 relaxed to fit our README tables and issue templates).formatjob inci.ymlrunsprettier --check+markdownlint(Node pinned by SHA —setup-nodev6.4.0 — deps vianpm ci+ committedpackage-lock.json).npmecosystem alongsidegithub-actions.The one judgment call: Hugo templates excluded from Prettier
The 7
layouts/**/*.htmlfiles 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. Solayouts/is in.prettierignore;.editorconfigstill governs its whitespace. Formatting templates viaprettier-plugin-go-templatecould 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.yamlchanges are formatting-only (flow-mapping spacing); every string value is byte-identical.Verified locally
prettier --check .→ clean ·markdownlint-cli2→ 0 errors--panicOnWarning) — reformattedcontent.yaml+ assets render finezizmor .github/workflows/→ no findings (new Node job included)gitleaks git .→ no leaks (incl. the newpackage-lock.json) ·npm cireproducibleAcceptance (#16)
.editorconfigpresent🤖 Generated with Claude Code