Set Prettier quoteProps to consistent to match eslint quote-props#213
Open
delthas wants to merge 2 commits into
Open
Set Prettier quoteProps to consistent to match eslint quote-props#213delthas wants to merge 2 commits into
delthas wants to merge 2 commits into
Conversation
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
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:
|
DarkIsDude
approved these changes
May 27, 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.
What
Change the shared Prettier config
quotePropsfrom'as-needed'to'consistent'(and the matching README line), then bump to8.3.3.Why
@scality/eslint-config-scalityships a Prettier config whosequoteProps: 'as-needed'contradicts the package's own ESLint rulequote-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), Prettieras-neededproduces mixed quoting that ESLintconsistent-as-neededthen rejects ("Inconsistently quoted property"). Any repo running both Prettier (viascality-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-propshalf of the ESLint↔Prettier conflict. The other half — ESLintindentvs Prettier indentation — cannot be reconciled by config (Prettier exposes no options to match ESLint'sindentrule) and is handled separately by each Prettier-adopting repo addingeslint-config-prettierto its own ESLint config.Context
as-needed) against the 2016 ESLintquote-propsrule, and armed as a CI check by GDL-14 (scality-prettier-diff)..tsfile in a Prettier-enforcing repo.Issue: GDL-15