Update Style/HashSyntax Rubocop rule

Ruby 3.1 adds the option for hash shortcuts, so it's possible to write
`{ user: , poll: }` instead of `{ user: user, poll: poll }`.

By default, Rubocop expects the new syntax in Ruby 3.1. While right now
I absolutely hate this new syntax, we're allowing both the old and the
new styles because we might start adopting it once we get used to it.
This commit is contained in:
Javi Martín
2023-07-20 03:24:02 +02:00
parent e74eff217b
commit fd9169e0d6

View File

@@ -646,6 +646,7 @@ Style/HashExcept:
Style/HashSyntax:
Enabled: true
EnforcedShorthandSyntax: either
Style/HashTransformKeys:
Enabled: true