fix: quote and broaden Prettier format script glob#206
Open
AleF83 wants to merge 2 commits into
Open
Conversation
Wrap the glob in double quotes and expand the extensions to cover js, ts, json, yaml, yml, and md files. Extend .prettierignore with .worktrees, wwwroot, Pages, and pnpm-lock.yaml to prevent Prettier from touching generated or vendor assets. Closes #188 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
70eff15 to
269de1b
Compare
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.
The
pnpm formatscript used an unquoted**/*.tsglob that the shell expanded before Prettier saw it — in shells withoutglobstar, this missed all files more than one directory deep. The fix quotes the glob so Prettier controls expansion and broadens the extension set to**/*.{js,ts,json,yaml,yml,md}, matching lint-staged coverage exactly..prettierignoreis extended with.worktrees,wwwroot,Pages, andpnpm-lock.yamlso the broader glob does not recurse into sibling worktrees or vendored assets.Known follow-up: Three files are already out of Prettier sync (
.vscode/launch.json,.vscode/tasks.json,e2e/config/server-options.json). A separate PR should runpnpm formatand commit those changes to keep the scope of this fix reviewable in isolation.Closes #188