about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChikahiro Tokoro <uzukifirst@gmail.com>2018-06-04 14:49:10 +0200
committerEugen Rochko <eugen@zeonfederated.com>2018-06-04 14:49:10 +0200
commit1637d24af4ada9baafb2eb7c3bacd2e1dfce171a (patch)
treeac888c8c163219e4bddc666ece232a3f4392d495
parente3fb528d123d7d56f3bb669634a18de358c87073 (diff)
fix RuboCop error (#7442)
* 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
-rw-r--r--.codeclimate.yml1
-rw-r--r--.rubocop.yml5
2 files changed, 5 insertions, 1 deletions
diff --git a/.codeclimate.yml b/.codeclimate.yml
index 21e6b33bf..58f6b3de4 100644
--- a/.codeclimate.yml
+++ b/.codeclimate.yml
@@ -30,6 +30,7 @@ plugins:
     channel: eslint-4
   rubocop:
     enabled: true
+    channel: rubocop-0-54
   scss-lint:
     enabled: true
 exclude_patterns:
diff --git a/.rubocop.yml b/.rubocop.yml
index a36aa5cae..6faeaca6f 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -107,5 +107,8 @@ Style/RegexpLiteral:
 Style/SymbolArray:
   Enabled: false
 
-Style/TrailingCommaInLiteral:
+Style/TrailingCommaInArrayLiteral:
+  EnforcedStyleForMultiline: 'comma'
+
+Style/TrailingCommaInHashLiteral:
   EnforcedStyleForMultiline: 'comma'