From fd9169e0d6febd7695154a2316cd3f2e54e500d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 20 Jul 2023 03:24:02 +0200 Subject: [PATCH] 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. --- .rubocop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.rubocop.yml b/.rubocop.yml index 2dce69504..8e8b05794 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -646,6 +646,7 @@ Style/HashExcept: Style/HashSyntax: Enabled: true + EnforcedShorthandSyntax: either Style/HashTransformKeys: Enabled: true