]> cat aescling's git repositories - mastodon.git/commitdiff
fix RuboCop error (#7442)
authorChikahiro Tokoro <uzukifirst@gmail.com>
Mon, 4 Jun 2018 12:49:10 +0000 (14:49 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 4 Jun 2018 12:49:10 +0000 (14:49 +0200)
* fix RuboCop error

RuboCop doesn't work by following error.

```
$ rubocop
Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead.
(obsolete configuration found in .rubocop.yml, please update it)
```

it comes from RuboCop 0.53.0 [\[Fix #3394\] Separate Array & Hash Literal Comma configuration by garettarrowood · Pull Request #5307 · bbatsov/rubocop](https://github.com/bbatsov/rubocop/pull/5307)

* ci(CodeClimate): specify RuboCop version 0.54

 * https://docs.codeclimate.com/docs/rubocop#section-using-rubocop-s-newer-versions
 * [RuboCop 0.55.0 is not available yet](https://github.com/codeclimate/codeclimate-rubocop/issues/121) on CodeClimate rubocop channel

.codeclimate.yml
.rubocop.yml

index 21e6b33bf019d2fc93e14a15c8fb430c2fbf2dbd..58f6b3de4d90dc5d21cfad8e3b688e98d567be2b 100644 (file)
@@ -30,6 +30,7 @@ plugins:
     channel: eslint-4
   rubocop:
     enabled: true
+    channel: rubocop-0-54
   scss-lint:
     enabled: true
 exclude_patterns:
index a36aa5caefa893149809378dcd4e3e6cdabb0752..6faeaca6f200fc371b27ae75f4b13f76db8a5762 100644 (file)
@@ -107,5 +107,8 @@ Style/RegexpLiteral:
 Style/SymbolArray:
   Enabled: false
 
-Style/TrailingCommaInLiteral:
+Style/TrailingCommaInArrayLiteral:
+  EnforcedStyleForMultiline: 'comma'
+
+Style/TrailingCommaInHashLiteral:
   EnforcedStyleForMultiline: 'comma'