Skip to content

Reconsider Style/StringLiterals: standard's double-quotes-always default #100

Description

@ineedjet

Summary

config/rubocop.yml inherits standard's base config (rubocop/standard.yml) and doesn't override Style/StringLiterals in config/rubocop/baseline.yml. standard's default for that cop is EnforcedStyle: double_quotes — every string literal must use double quotes, even when nothing in the string needs interpolation or an escape sequence.

Why raise it

Worth discussing whether that's the right default for this shared config, or whether it should be overridden the way other standard defaults already are in config/rubocop/baseline.yml (see LINTERS-DEFAULTS-OVERRIDES.md for the existing precedent of documented deviations from upstream standard/RuboCop defaults).

The usual argument for single-quotes-by-default (traditional community Ruby style, pre-standard): a plain string with no interpolation/escapes needs no double-quote machinery, and reserving double quotes for when you actually need interpolation or escape sequences makes intent visible at the call site ("#{name}" vs 'literal').

Not proposing a specific resolution here — just flagging it as worth a deliberate decision (keep standard's double-quotes-always, or override to single-quotes-preferred) rather than an inherited default nobody explicitly chose.

Reference

  • config/rubocop.yml (inherits rubocop/standard.yml)
  • config/rubocop/baseline.yml (where an override would go, following the existing pattern)
  • LINTERS-DEFAULTS-OVERRIDES.md (where the rationale would get documented, per existing convention)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions