Cleanup after prettier - #6305
Closed
francoisferrand wants to merge 9 commits into
Closed
francoisferrand wants to merge 9 commits into
francoisferrand wants to merge 9 commits into
Conversation
Prettier now owns line length, so drop the eslint max-len rule it conflicts with and the disable directives that went with it. Issue: CLDSRV-1002
Generated with `yarn prettier:write`, no manual edit. Issue: CLDSRV-1002
Prettier pads markdown table cells for alignment, which pushed this table to 82 columns and tripped MD013. mdlint's config lives in the shared Guidelines package and cannot be relaxed per repo, so shorten the widest cell instead. Issue: CLDSRV-1002
websiteHead.js and websiteHeadWithACL.js assert the ETag of index.html, so reformatting these fixtures changes their MD5 and breaks the tests. Their bytes are the test data, not source to style. Issue: CLDSRV-1002
GitHub reads .git-blame-ignore-revs automatically; locally it needs git config blame.ignoreRevsFile .git-blame-ignore-revs Issue: CLDSRV-1002
Prettier reflowed the code to 120 columns, which left many messages and test descriptions as chains of short literals joined with `+`. Merge adjacent literals into a single string wherever the result fits; strings that cannot fit are re-split into as few pieces as possible. Issue: CLDSRV-1002
Strings that were wrapped by hand for the old 80-column limit kept their short pieces after the Prettier reflow, often as one short line followed by several full ones. Re-split them into as few balanced pieces as fit in 120 columns, or into a single literal when it fits. Issue: CLDSRV-1002
Where a message was built as a plain string concatenated with a template literal, merge the pieces into a single template literal. Kept separate from the plain-string merges so it can be reviewed, or dropped, on its own. Issue: CLDSRV-1002
Merging the hand-wrapped literals exposed pieces that had been joined without a separating space (and one doubled space), in test names and in a few error messages. Add the missing spaces. Issue: CLDSRV-1002
Codecov Report❌ Patch coverage is Additional details and impacted files
@@ Coverage Diff @@
## improvement/CLDSRV-1002/prettier-whole-repo #6305 +/- ##
===============================================================================
- Coverage 85.32% 85.20% -0.12%
===============================================================================
Files 206 206
Lines 13435 13412 -23
===============================================================================
- Hits 11463 11428 -35
- Misses 1972 1984 +12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
DarkIsDude
force-pushed
the
improvement/CLDSRV-1002/prettier-whole-repo
branch
2 times, most recently
from
September 24, 2026 09:08
78bbc7c to
a84bddd
Compare
Contributor
|
merged in #6297 (comment) |
DarkIsDude
deleted the
improvement/CLDSRV-1002/cleanup-after-prettier
branch
September 24, 2026 09:53
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.
String cleanup after the Prettier reformat
The reformat to 120 columns left about 850 strings in the state they had been
hand-wrapped for the old 80-column limit: chains of short literals joined with
+(often collapsed by Prettier onto one line,'foo ' + 'bar'), messagessplit as one short piece, several full pieces and another short one, and plain
strings concatenated with template literals. Prettier does not touch string
literals, so this has to be done by hand. These commits do it; string values
are preserved byte for byte, except for the last commit.
As a learning, we must also remember to run prettier/eslint in loop:
Manual fixes
Lint options to consider
no-useless-concat(ESLint core, currently not enabled): at the PR head itflagged 786 of the 849 concatenations found in review; the 63 it missed are
multi-line chains, which the rule ignores by design. It also flags 294
places nobody commented on, which would have to be fixed before enabling it.
prefer-template(enabled) ignores chains made only of literals, so'foo ' +${bar}`` is never reported.max-lenisoffineslint.config.mjs. It is deprecated in ESLint core(still shipped in v9, removed in v10);
@stylistic/max-lenis themaintained replacement. With
code: 120andignoreStrings: falseitwould report the 99 lines above; with
ignoreStrings: trueit reportsnothing useful here.
that needs a custom rule.
Issue: CLDSRV-1002