Repository navigation
Conversation
Each repeats a test of the same file: the 2KB user metadata MPU test, the copy of a nonexistent object, the multiObjectDelete authorization suite (left twice by a backport merge), a tag delete test copied into the put/get file with a put/get title, and the NoSuchQuota test. mocha/no-identical-title, enabled by the Guidelines 8.4 test helper, reports them. Issue: CLDSRV-1076
mocha/no-identical-title, enabled by the Guidelines 8.4 test helper, reports titles repeated in the same suite. Name each test after what it checks: the sequential versioning steps, the ON and OFF legal hold cases, the lifecycle date formats. Tests in sibling suites declared through skip wrappers (describeSkipIfNotMultiple) count as one suite for the rule, which cannot follow a wrapper chosen at run time. Issue: CLDSRV-1076
Contributor
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
Codecov Report❌ Patch coverage is Additional details and impacted files
... and 2 files with indirect coverage changes @@ Coverage Diff @@
## development/9.6 #6377 +/- ##
===================================================
- Coverage 90.80% 90.77% -0.04%
===================================================
Files 207 207
Lines 39047 39021 -26
===================================================
- Hits 35456 35420 -36
- Misses 3591 3601 +10
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
delthas
force-pushed
the
improvement/CLDSRV-1076/prettier-reformat
branch
from
November 17, 2026 15:32
39a925c to
7fa4cec
Compare
delthas
force-pushed
the
improvement/CLDSRV-1076/prettier-reformat
branch
from
November 17, 2026 15:48
7fa4cec to
0c858fd
Compare
delthas
force-pushed
the
improvement/CLDSRV-1076/prettier-reformat
branch
from
November 17, 2026 16:01
0c858fd to
f68dfb7
Compare
delthas
marked this pull request as ready for review
November 17, 2026 16:05
Guidelines 8.4 exports a flat config that assumes Prettier, so spread it instead of loading the eslintrc one through FlatCompat. The overrides of rules that Guidelines no longer enables, or that Prettier already turns off, are gone. Its mocha() helper replaces the local Mocha setup for the test files: the Mocha globals, which Guidelines no longer declares for every file, and the exclusive and identical title checks. It needs eslint-plugin-mocha 11 or later. The rules 8.4 enables that still report problems here stay off for now (no-useless-escape, max-len, no-useless-assignment, no-unassigned-vars, preserve-caught-error): the next commits fix them one by one. Issue: CLDSRV-1076
Nothing loads @eslint/compat or eslint-plugin-import. Issue: CLDSRV-1076
Parsed as scripts, every top-level require of a module named like a Node global (crypto, URL...) redeclared it, which is why no-redeclare had builtinGlobals off. ESLint config files and the .mjs scripts stay ES modules. Issue: CLDSRV-1076
ecmaVersion 2021 came from the eslintrc config. In a flat config it also limits the globals, and it rejects syntax Node supports (??=, private fields). Issue: CLDSRV-1076
Guidelines 8.4 supports it. The flat config needs no change; the mocha, n and promise plugins still report under ESLint 10. Issue: CLDSRV-1076
jsonGrants and aclOwnerID were declared only to pass undefined to the next step, which no-unassigned-vars reports. Issue: CLDSRV-1076
Reported by no-useless-assignment, new in ESLint 10's recommended rules. Issue: CLDSRV-1076
Reported by preserve-caught-error, new in ESLint 10's recommended rules. Issue: CLDSRV-1076
The template literal carried a newline and the source indentation into the message. Issue: CLDSRV-1076
Guidelines 8.4 enables no-useless-escape, which this repository had turned off: 340 of its 343 reports are in this mock. Its raft logs held bucket attributes and object metadata as JSON encoded twice by hand, inside single-quoted strings split for the old 80-column limit, so every \" in them is a useless escape. Dropping the backslashes would have fixed the lint but kept a fixture nobody can read or edit. Build the same values with JSON.stringify from plain objects instead. The mocked response is byte-identical. Issue: CLDSRV-1076
no-useless-escape had been off since the eslintrc config; Guidelines enables it. Issue: CLDSRV-1076
The rewrap of CLDSRV-1002 only covered part of the chains still wrapped for the old 80-column limit. String values are unchanged. Issue: CLDSRV-1076
Lay out the code around the rewrapped strings: calls whose title or message now fits are joined, and their bodies reindented. Issue: CLDSRV-1076
The rewrap left these pieces on the same line once Prettier joined the calls. String values are unchanged. Issue: CLDSRV-1076
String values are unchanged. Issue: CLDSRV-1076
Lay out the code around the rewrapped messages. Issue: CLDSRV-1076
Test titles and chained search queries in tests lost a space where they had been split for the old 80-column limit. This is the only string commit that changes values. Issue: CLDSRV-1076
Prettier keeps a test call on one line when its title is a single literal, so these titles were the only way past the line limit. Most were a few characters over: drop filler words. The permission check cases now say "same account" / "different accounts" for the bucket owner and requester. Issue: CLDSRV-1076
Guidelines lints max-len again. Split or extract the long strings, templates and comments Prettier can't wrap. A permalink comment and the rateLimit test regexes can't be split without changing where they lead or what they match: they keep a max-len disable comment. Issue: CLDSRV-1076
Name the migration trend once instead of building it twice. Issue: CLDSRV-1076
The lint script only listed .js files, so the GitHub scripts and the ESLint config were never linted (and could not be parsed as scripts). The GitHub scripts are command-line tools: let them print. Issue: CLDSRV-1076
Fix what the lint of the .mjs scripts reports: braces, quotes, a template literal, and a no-console disable comment that the new override makes unused. Issue: CLDSRV-1076
Lay out the code eslint --fix changed. Issue: CLDSRV-1076
yarn run prettier finds the binary without a script, and Prettier already skips the coverage and junit directories listed in .gitignore. Issue: CLDSRV-1076
A bare eslint-disable-next-line turns off every rule on the next line. Fix the three lines that only hid style rules (quotes, arrow-body-style, prefer-template), and name the rule on the others: no-param-reassign for the metadata updates, no-sparse-arrays for a deliberately sparse array in a test. Issue: CLDSRV-1076
CONTRIBUTING said Prettier was only checked on changed files, and that yarn may rewrite package.json with 2-space indentation, which yarn 1.22 doesn't. CLAUDE.md still described the ECMAScript 2021, script-mode config with formatting rules turned off. Issue: CLDSRV-1076
Add the generated commits of this series, the quoteProps reformat of Guidelines 8.3.3 and the earlier per-change Prettier reformats, all formatting only. Issue: CLDSRV-1076
delthas
force-pushed
the
improvement/CLDSRV-1076/prettier-reformat
branch
from
November 17, 2026 18:55
f68dfb7 to
e078608
Compare
francoisferrand
approved these changes
Nov 17, 2026
This branch has not been deployed
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.
So far, cloudserver was already Prettier-formatted (the whole-repo reformat of CLDSRV-1002), but it still used the Guidelines 8.3 ESLint config through FlatCompat, with most of its rules turned off, and its lint script only covered the
.jsfiles.It was decided to do a one-shot big bang PR to switch every repository to the same config. Here it is.
This switches to the Guidelines 8.4.0 ESLint config, which assumes Prettier and lints the tests through its
mocha()helper, upgrades to ESLint 10, and fixes/reformats code until everything passes.Please review commit by commit.
no-identical-titlenow reports. 5 of those are tests in sibling suites declared through skip wrappers (describeSkipIfNotMultiple), which the rule can't tell apart.jsfiles are now linted as CommonJS (no moreno-redeclareoverride), and the.mjsscripts, which were never linted, are linted tooJSON.stringify: the mocked response is the same"Foo." + "Bar."->"Foo.Bar."-> oops, a space was missing all along -> fixed into"Foo. Bar."(in test titles, and in chained search queries ofvalidateSearch.js; I also had to shorten many test titles to make them pass 120-length nicely, and two regexes and a permalink keep amax-lendisable comment)eslint-disable-next-linecomments now name their rule, or are gone when the line could just be fixedThis targets
9.6because we have a lot of open PRs on this branch (and not so much on 9.5), so it's easier for developers to rebase on 9.6 and have a conflict there, then have them fix conflicts in their 9.7- integration branch if we merged in 9.7.The Arsenal and backbeat PRs are at scality/Arsenal#2751 and scality/backbeat#2925
Issue: CLDSRV-1076