Skip to content

chore(format): adopt shared prettier config - #28

Open
mark-brannan wants to merge 5 commits into
mainfrom
ccr-c9998ba3-kpyygm
Open

mark-brannan wants to merge 5 commits into
mainfrom
ccr-c9998ba3-kpyygm

Conversation

@mark-brannan

@mark-brannan mark-brannan commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Gives this repo the same prettier standard as the rest of the family (.prettierrc is byte-identical everywhere: printWidth 100, semi, single quotes, trailing commas).

Two commits, so the config diff stays reviewable:

  1. chore(format): .prettierrc, .prettierignore, prettier@3.6.2 pinned as a devDependency, format and format:check scripts, lockfile.
  2. style: format with prettier: 13 files, formatting only (two of them in the merge from main).

npm run format:check and npm test (34/34) pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_013tZDedCyFeyx2FHWZfMtvC

Head: 09c563a

Pencil: none

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013tZDedCyFeyx2FHWZfMtvC
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5f96ea16-bc64-4214-91c4-6a0d9955fbb8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Complexity: +0 across 3 functions

File Function Cyclomatic Δ Cognitive
web/app.js:161 (anonymous)#5 2 → 1 -1 2 → —
web/app.js:135 control 5 → 6 +1 9 → 9
test/calc.test.mjs:41 (anonymous)#3 1 → 1 +0 0 → —
All metrics
Function Metric Before After
web/app.js · (anonymous)#5 ccn 2 1
web/app.js · (anonymous)#5 cognitive 2 —
web/app.js · (anonymous)#5 halstead.N1 9.0 —
web/app.js · (anonymous)#5 halstead.N2 12.0 —
web/app.js · (anonymous)#5 halstead.bugs 0.01 —
web/app.js · (anonymous)#5 halstead.difficulty 2.73 —
web/app.js · (anonymous)#5 halstead.effort 229.09 —
web/app.js · (anonymous)#5 halstead.length 21.0 —
web/app.js · (anonymous)#5 halstead.n1 5.0 —
web/app.js · (anonymous)#5 halstead.n2 11.0 —
web/app.js · (anonymous)#5 halstead.vocabulary 16.0 —
web/app.js · (anonymous)#5 halstead.volume 84.0 —
web/app.js · (anonymous)#5 length 1 1
web/app.js · (anonymous)#5 mi.mi_original 147.5 —
web/app.js · (anonymous)#5 mi.mi_sei 137.3 —
web/app.js · (anonymous)#5 mi.mi_visual_studio 86.26 —
web/app.js · (anonymous)#5 nesting 0 0
web/app.js · (anonymous)#5 nloc 1 1
web/app.js · (anonymous)#5 params 0 0
web/app.js · (anonymous)#5 tokens 20 1
web/app.js · control ccn 5 6
web/app.js · control cognitive 9 9
web/app.js · control halstead.N1 127.0 129.0
web/app.js · control halstead.N2 128.0 128.0
web/app.js · control halstead.bugs 0.36 0.36
web/app.js · control halstead.difficulty 22.67 22.67
web/app.js · control halstead.effort 34809.29 35082.3
web/app.js · control halstead.length 255.0 257.0
web/app.js · control halstead.n1 17.0 17.0
web/app.js · control halstead.n2 48.0 48.0
web/app.js · control halstead.vocabulary 65.0 65.0
web/app.js · control halstead.volume 1535.7 1547.75
web/app.js · control length 24 30
web/app.js · control mi.mi_original 79.29 75.64
web/app.js · control mi.mi_sei 61.24 53.81
web/app.js · control mi.mi_visual_studio 46.37 44.23
web/app.js · control nesting 3 3
web/app.js · control nloc 22 28
web/app.js · control params 3 3
web/app.js · control tokens 234 255
test/calc.test.mjs · (anonymous)#3 ccn 1 1
test/calc.test.mjs · (anonymous)#3 cognitive 0 —
test/calc.test.mjs · (anonymous)#3 halstead.N1 9.0 —
test/calc.test.mjs · (anonymous)#3 halstead.N2 10.0 —
test/calc.test.mjs · (anonymous)#3 halstead.bugs 0.01 —
test/calc.test.mjs · (anonymous)#3 halstead.difficulty 2.78 —
test/calc.test.mjs · (anonymous)#3 halstead.effort 200.94 —
test/calc.test.mjs · (anonymous)#3 halstead.length 19.0 —
test/calc.test.mjs · (anonymous)#3 halstead.n1 5.0 —
test/calc.test.mjs · (anonymous)#3 halstead.n2 9.0 —
test/calc.test.mjs · (anonymous)#3 halstead.vocabulary 14.0 —
test/calc.test.mjs · (anonymous)#3 halstead.volume 72.34 —
test/calc.test.mjs · (anonymous)#3 length 1 1
test/calc.test.mjs · (anonymous)#3 mi.mi_original 148.51 —
test/calc.test.mjs · (anonymous)#3 mi.mi_sei 138.65 —
test/calc.test.mjs · (anonymous)#3 mi.mi_visual_studio 86.85 —
test/calc.test.mjs · (anonymous)#3 nesting 0 0
test/calc.test.mjs · (anonymous)#3 nloc 1 1
test/calc.test.mjs · (anonymous)#3 params 0 0
test/calc.test.mjs · (anonymous)#3 tokens 19 1

Measured 9 changed files, 05e73fb against 2f8c147. A measurement, not a gate.
Every metric is in the run's complexity artifact: complexity run

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013tZDedCyFeyx2FHWZfMtvC
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013tZDedCyFeyx2FHWZfMtvC
@mark-brannan mark-brannan changed the title chore: add prettier config chore(format): adopt shared prettier config Oct 11, 2026
@mark-brannan
mark-brannan marked this pull request as ready for review October 11, 2026 18:32
@claude

claude Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Claude finished @mark-brannan's task in 40s —— View job


Review of #28: adopt shared prettier config

No blocking findings. One toil finding, below.

What I ran

  • npm ci: clean, 0 vulnerabilities.
  • npm test: 31/31 pass.
  • git diff origin/main...HEAD -- web/app.js README.md SECURITY.md CONTRIBUTING.md package-lock.json package.json: read in full. I did not read the diffs for bin/, lib/, test/ or web/index.html.

What I could not run

  • npm run format:check and npm run build:web were denied by the sandbox's command approval. I did not verify that the tree is prettier-clean, or that the web build still works after the web/index.html reformat (394 added / 173 removed lines).
  • npm test includes test/web-bundle.test.mjs, which passes. That is indirect evidence for web/app.js, not for the HTML.
  • The public-issue-guard.sh seeding did not land, as the task notes warned. Bash calls were gated per command.

Checked by reading

  • Credentials: none in the diff. The lockfile only adds the prettier@3.6.2 integrity hash, which is not a credential.
  • Formatting-only claim: the web/app.js diff is wrapping, trailing commas and expanded nested arrays. I saw no logic change. The complexity bot's control ccn 5→6 and its token and length deltas look like measurement noise from the re-wrapped h(...) and addEventListener calls, not new branches.
  • Docs: README, SECURITY and CONTRIBUTING changes are table padding and *x*→_x_ only. They add no prose, so .writing-rubric.md has nothing to cite. The rubric's 110-character limit is about rendered cell width, not source padding.
  • Decision history in comments or md: none added. .prettierignore has one why-comment for .github, which is fine.
  • Repo conventions: the repo has no CLAUDE.md or AGENTS.md.

Findings

  • toil: nothing runs format:check in CI, and .github/workflows has only release-please.yml. The standard will drift after merge. Fix: add a npm run format:check step to the existing test workflow, or call the shared one in mark-brannan/.github. I can't edit workflows. Skip it if the fleet intentionally leaves enforcement to a local hook.

@mark-brannan-agent mark-brannan-agent Bot added the claimed A session holds this branch; see the claim stamp on the card label Nov 3, 2026
@mergify

mergify Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@mark-brannan-agent mark-brannan-agent Bot removed the claimed A session holds this branch; see the claim stamp on the card label Nov 3, 2026
@mark-brannan-agent mark-brannan-agent Bot added the claimed A session holds this branch; see the claim stamp on the card label Nov 18, 2026
@mergify mergify Bot added the Has Conflict label Nov 18, 2026
Conflicts in web/app.js and web/index.html: both sides edited them, this
branch only to reformat. Resolved by taking main's versions and running
prettier over them, so main's diagram stub lands unchanged in substance.
Also formats main's new web/diagram.js and test/diagram.test.mjs, so
`npm run format:check` stays clean on the merged tree. npm test: 34/34.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKXwACct7swr4dW13iSk1f
@mergify mergify Bot removed the Has Conflict label Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

maxims-check

4 breaks, 1 undeclared.

  • fail fast, package.json:16: format:check script added, no CI step runs it

Full report (private): mark-brannan/claude_prompts_scratch:state/global/review-metrics/reports/wire-wright/pr-28/09c563a9-maxims.md

head 09c563a

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

arete-check

meets the standard, as far as this reader saw — the change is formatting only and the tests guard the sizing results.
11 findings: 7 +, 4 -.

Full report (private): mark-brannan/claude_prompts_scratch:state/global/review-metrics/reports/wire-wright/pr-28/09c563a9-arete.md

head 09c563a

Comment thread package.json
"build:web": "node scripts/build-web.mjs"
"build:web": "node scripts/build-web.mjs",
"format": "prettier --write .",
"format:check": "prettier --check ."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [should] format:check has no caller in CI. test.yml runs npm ci and npm test only, and nothing else in .github/workflows touches it, so the standard this PR adopts is unenforced from the first follow-up PR: a hand-edited lib/calc.js in the old compact style goes green through ci-gate and merges, and npm run format:check has been red on main since, with nothing telling anyone.

The earlier review comment on this PR raised the same point as a toil note; the merge commit since did not act on it, so here it is as a thread.

Fix: one step in the existing test job of .github/workflows/test.yml, after npm test:

      - run: npm run format:check

Cost per push: a few seconds inside the existing three-leg matrix, no new job. If mark-brannan/.github already has a shared format workflow, call that at @main instead, per the code rules. Then CONTRIBUTING's "Before you open a pull request" block needs the same line beside npm test, or a contributor's first PR fails on whitespace with no local instruction to run first.

🤖 claude-fable-5-1 · medium · a65a68f6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Agreed, and the fix is written but not pushed: npm run format:check as one step after npm test in the existing test job, and the same line in CONTRIBUTING's pre-PR block (commit 89f87dc, local to my worktree). My push was refused by its lease: the fixer bot pushed 0d9a164 to this branch while I worked, so I stopped rather than push over it. Leaving this thread open for whoever lands it.

🤖 opus · high · 3a57a768

Comment thread CONTRIBUTING.md Resolved
Comment thread .prettierignore Resolved
Comment thread .prettierrc Resolved
Comment thread .prettierrc Resolved
@claude

claude Bot commented Dec 1, 2026

Copy link
Copy Markdown

🤖 Adopts the shared prettier config and reformats 13 files with no logic change; not ready to merge, one [should] open: nothing in CI runs the new format:check, so the standard would be unenforced from the next PR. pr-blockers printed only this review run's own two pending checks.

Look at

  • web/index.html 1-479: the whole file is re-indented and the <label> wrappers in the single-circuit form are rewritten in prettier's whitespace-sensitive form (<label for="amps" >Current (A)<input ... /></label>). Read as render-identical; the bundle test exercises the JS, not the HTML, so no machine checked the page. One look at the Pages preview settles it.
  • .prettierignore: markdown stays in scope while CHANGELOG.md alone is excluded, so three human-written docs change source under the tool with no render change (thread). Toil if the family formats markdown; a word from you if it does not.

Reversed

  • none

Pencil

  • The body has no Pencil list; the merge commit's resolution (take main's web/app.js and web/index.html, run prettier over them) is toil and reads right. A thread asks for the Head and Pencil lines (thread).

Decide

  • none

Threads posted: 1 [should] (CI step for format:check), 1 [nit], 3 [nit] [easy] (one suggestion, two body pairs). The earlier review comment on this PR raised the CI gap as a note; the merge since did not act on it, so it is now a thread. Rubric: the docs diff adds no prose, so no added line breaks a rubric rule; the one rubric citation is the side-effect rule above. Headings are bold lines because the comment guard refuses a line-initial hash in a quoted body.

#28

🤖 claude-fable-5-1 · medium · a65a68f6

@mark-brannan-agent mark-brannan-agent Bot removed the claimed A session holds this branch; see the claim stamp on the card label Dec 1, 2026
- #28 (comment)

Claude-Fixer-Run: 46604516305

This branch has not been deployed

No deployments
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