CLDSRV-1002: format the whole codebase with prettier - #6297
DarkIsDude wants to merge 5 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
Hello darkisdude,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
This comment was marked as resolved.
This comment was marked as resolved.
|
/create_pull_requests |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
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
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
Follow integration pull requests if you would like to be notified of The following options are set: create_pull_requests |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: create_pull_requests |
|
https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files#ignore-commits-in-the-blame-view |
GitHub reads .git-blame-ignore-revs automatically; locally it needs git config blame.ignoreRevsFile .git-blame-ignore-revs Issue: CLDSRV-1002
| console.error( | ||
| 'Missing required environment variables: ' + | ||
| 'AWS_GCP_BACKEND_ACCESS_KEY and AWS_GCP_BACKEND_SECRET_KEY' | ||
| 'Missing required environment variables: ' + 'AWS_GCP_BACKEND_ACCESS_KEY and AWS_GCP_BACKEND_SECRET_KEY', |
There was a problem hiding this comment.
| 'Missing required environment variables: ' + 'AWS_GCP_BACKEND_ACCESS_KEY and AWS_GCP_BACKEND_SECRET_KEY', | |
| 'Missing required environment variables: AWS_GCP_BACKEND_ACCESS_KEY and AWS_GCP_BACKEND_SECRET_KEY', |
This needs to be fixed across codebase, if a multiple line string is reduced to 1 line, you can remove the concatenation
| 'otherwise only list the latest version') | ||
| .option( | ||
| '-l, --list-versions', | ||
| 'List all versions of the objects that meet the search query, ' + 'otherwise only list the latest version', |
There was a problem hiding this comment.
| 'List all versions of the objects that meet the search query, ' + 'otherwise only list the latest version', | |
| 'List all versions of the objects that meet the search query, otherwise only list the latest version', |
| numberRules: 'The number of CORS rules should not exceed allowed limit ' + 'of 100 rules.', | ||
| originAndMethodExist: 'Each CORSRule must identify at least one origin ' + 'and one method.', |
There was a problem hiding this comment.
| numberRules: 'The number of CORS rules should not exceed allowed limit ' + 'of 100 rules.', | |
| originAndMethodExist: 'Each CORSRule must identify at least one origin ' + 'and one method.', | |
| numberRules: 'The number of CORS rules should not exceed allowed limit of 100 rules.', | |
| originAndMethodExist: 'Each CORSRule must identify at least one origin and one method.', |
| 'Invalid protocol, protocol can be http or ' + | ||
| 'https. If not defined, the protocol will be selected ' + | ||
| 'automatically.'; |
There was a problem hiding this comment.
strings like that could be manually edited to move the concatenation to fit in 2 lines instead of 3.
Or maybe dropping the multiple concatenations is enough to fit in 1 line.
| # Whole-repo Prettier reformat (CLDSRV-1002), no behaviour change. | ||
| # Run once locally: git config blame.ignoreRevsFile .git-blame-ignore-revs | ||
| 02f94246fe9d3f9e4484d526adc81a73e90a0540 |
There was a problem hiding this comment.
I think the first two lines are inverted. The "run once" should be the header, then we have one comment per hash below.
There was a problem hiding this comment.
(For when we have future commits we want to ignore later)
Motivation and context
Prettier has only ever been checked on the files a PR touches, so the codebase
was being reformatted a few files at a time and most of it was still
unformatted. The RRR of Sep 7, 2026 concluded we should stop spreading it out
and do it in one go, so that formatting noise never lands in a review again.
Base is
development/9.3because that is the earliest branch that has thePrettier tooling (
60bb2134); 9.4 and 9.5 inherit it by forward merge.What changed
Two commits, in this order:
👷 check prettier formatting on the whole repo— the CI job runsprettier --check .instead of diffing against the merge base.scripts/prettier-diff.shand theprettier:diffscript are gone, replacedby
prettier:checkandprettier:write. ESLint'smax-lenis turned off:it duplicates Prettier's
printWidthand disagrees with it on ~14 linesPrettier cannot break (long string literals). The 12 now-dead
eslint-disable max-lendirectives are removed with it.🎨 format the whole codebase with prettier— 564 files, the plainoutput of
yarn prettier:write, no manual edit on top.Review the first commit; the second is mechanical.
Verification
yarn prettier:check— cleanyarn lint— 0 errors, 2947 warnings, identical todevelopment/9.3yarn test— 5156 passing, 5 pendingRelated issues
https://scality.atlassian.net/browse/CLDSRV-1002