Skip to content

Set Prettier quoteProps to consistent to match eslint quote-props - #213

Merged
bert-e merged 2 commits into
development/8.3from
improvement/GDL-15/prettier-quoteprops-consistent
May 28, 2026
Merged

Set Prettier quoteProps to consistent to match eslint quote-props#213
bert-e merged 2 commits into
development/8.3from
improvement/GDL-15/prettier-quoteprops-consistent

Conversation

@delthas

@delthas delthas commented May 27, 2026

Copy link
Copy Markdown

What

Change the shared Prettier config quoteProps from 'as-needed' to 'consistent' (and the matching README line), then bump to 8.3.3.

Why

@scality/eslint-config-scality ships a Prettier config whose quoteProps: 'as-needed' contradicts the package's own ESLint rule quote-props: 'consistent-as-needed' — which has been in place since 2016. On objects with mixed keys (some requiring quotes, e.g. 'content-md5', others not, e.g. expires), Prettier as-needed produces mixed quoting that ESLint consistent-as-needed then rejects ("Inconsistently quoted property"). Any repo running both Prettier (via scality-prettier-diff) and ESLint over the same file therefore gets conflicting requirements and cannot satisfy both.

Setting Prettier to 'consistent' makes its output match the ESLint rule (quote all-or-none). This only affects repos that actually run Prettier — the Prettier config is not consumed by ESLint-only repos — so it is a safe, global reconciliation with no downside for non-Prettier consumers.

Scope

This resolves the quote-props half of the ESLint↔Prettier conflict. The other half — ESLint indent vs Prettier indentation — cannot be reconciled by config (Prettier exposes no options to match ESLint's indent rule) and is handled separately by each Prettier-adopting repo adding eslint-config-prettier to its own ESLint config.

Context

  • Full analysis and the broader fix plan: https://scality.atlassian.net/wiki/x/CQDe8
  • The contradiction was introduced by GDL-12 (Prettier config added with as-needed) against the 2016 ESLint quote-props rule, and armed as a CI check by GDL-14 (scality-prettier-diff).
  • First surfaced by Arsenal ARSN-572 — the first PR to touch a previously-unformatted .ts file in a Prettier-enforcing repo.

Issue: GDL-15

delthas added 2 commits May 27, 2026 16:42
The shared Prettier config used quoteProps: 'as-needed' while the
package's eslint config has enforced quote-props: 'consistent-as-needed'
since 2016. On objects with mixed keys (some requiring quotes, some not)
the two disagree: Prettier produces mixed quoting and eslint then
rejects it. Switching Prettier to 'consistent' makes its output match
the eslint rule (quote all-or-none).

This only affects repos that run Prettier (the prettier config is not
consumed by eslint-only repos), so it is a safe, global reconciliation.

Issue: GDL-15
Issue: GDL-15
@bert-e

bert-e commented May 27, 2026

Copy link
Copy Markdown
Contributor

Hello delthas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented May 27, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@delthas
delthas marked this pull request as ready for review May 27, 2026 14:45
@delthas
delthas requested a review from a team May 27, 2026 14:47
@delthas

delthas commented May 28, 2026

Copy link
Copy Markdown
Author

/approve

@bert-e

bert-e commented May 28, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/8.3

The following branches have NOT changed:

  • development/6.4
  • development/7.10
  • development/7.4
  • development/8.2

Please check the status of the associated issue GDL-15.

Goodbye delthas.

The following options are set: approve

@bert-e
bert-e merged commit 2612b65 into development/8.3 May 28, 2026
1 check passed
@bert-e
bert-e deleted the improvement/GDL-15/prettier-quoteprops-consistent branch May 28, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants