Skip to content

Commit 1ea6aaf

Browse files
authored
feat: have Rubocop always enforce shorthand hash syntax (#623)
This was the default since Ruby 3.1 but turns out a year ago [they changed it to "either"](rubocop/rubocop#13300) - since we already decided we're in favor of using this syntax when the rule originally came out, and I don't think there's any value in using it conditionally, this has Rubocop enforce it again
1 parent 250644b commit 1ea6aaf

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ Lint/AmbiguousBlockAssociation:
190190
Exclude:
191191
- 'spec/**/*'
192192

193+
Style/HashSyntax:
194+
EnforcedShorthandSyntax: always
195+
193196
# https://rubocop.readthedocs.io/en/latest/cops_style/
194197
Style/HashTransformKeys:
195198
Enabled: false

variants/backend-base/rubocop.yml.tt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ Lint/AmbiguousBlockAssociation:
210210
Exclude:
211211
- 'spec/**/*'
212212

213+
Style/HashSyntax:
214+
EnforcedShorthandSyntax: always
215+
213216
# https://rubocop.readthedocs.io/en/latest/cops_style/
214217
Style/HashTransformKeys:
215218
Enabled: false

0 commit comments

Comments
 (0)