Fix prettier↔eslint config drift on comma-dangle functions#69
Open
senoff wants to merge 1 commit into
Open
Conversation
This was referenced May 7, 2026
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.
Original Problem
.prettierrchad"trailingComma": "all", which adds trailing commas after function parameters and arguments..eslintrchad"comma-dangle": functions: "never". Running prettier then eslint (or vice versa) produces changes each tool immediately reverts. The conflict caused pre-commit hook failures on any PR that ran prettier's format step. See the three concurrent PRs (#58, #59) that each independently included.prettierrcchanges because the hook was fighting them.Cause
trailingComma: "all"is a Prettier setting introduced in Prettier 2 that adds commas in function signatures. ESLint'scomma-dangle: { functions: "never" }is the inverse. The two configs were set independently and neither was updated when the other changed.Fix
Change
.prettierrcto"trailingComma": "es5"— this stops prettier from adding trailing commas in function calls/definitions, which is the only location where eslint and prettier disagreed.Four supporting
.eslintrcchanges that reduce false-positive lint errors arising from prettier's formatting:import/extensions: off— CommonJSrequire()project; import extension enforcement is irrelevant.max-len: ignoreTemplateLiterals: true— template literals can legitimately exceed 120 chars; prettier does not break them.quotes: avoidEscape: true— allows double quotes when the string contains single quotes; prettier uses this heuristic.space-before-function-paren: anonymous: "ignore"— prettier formats anonymous functions without a space;"never"caused lint errors on valid prettier output.Files changed
.prettierrc—"trailingComma"value changed from"all"to"es5".eslintrc— four rule adjustmentsTest Run
No code changed — config only. Pre-commit hook conflict reduced: with
trailingComma: "es5"prettier no longer writes trailing commas in function calls, so eslint'scomma-dangle: functions: "never"is satisfied.Cross-PR check
PRs #58 and #59 both include
.prettierrcedits (same change:"all"→"es5"). Their regenerated versions will strip that.prettierrcedit and reference this PR as the canonical config change. No other open PRs touch.eslintrcor.prettierrc.Excel/soffice verification
Not applicable — config only, no XLSX serialization touched.
grace-review summary
openai:gpt-5.5 — No defects found. gemini:gemini-2.5-flash — MEDIUM:
import/extensions: offconcern; LOW: anonymous spacing. Both dismissed: this is a Node.js CommonJS project (require()-only),import/extensionsis irrelevant. Anonymous spacing set to"ignore"because prettier's output varies and"never"was generating false-positive errors on valid code.Note: committed with
--no-verifyper AGENTS.md Rule 1 (pre-commit hook conflict is the exact problem this PR fixes).