Skip to content

Commit

Permalink
fix RuboCop error (mastodon#7442)
Browse files Browse the repository at this point in the history
* 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 mastodon#3394\] Separate Array & Hash Literal Comma configuration by garettarrowood · Pull Request mastodon#5307 · bbatsov/rubocop](rubocop/rubocop#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](codeclimate/codeclimate-rubocop#121) on CodeClimate rubocop channel
  • Loading branch information
kibitan authored and lawremipsum committed Jul 7, 2018
1 parent 77e8a49 commit 51b08f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ plugins:
channel: eslint-4
rubocop:
enabled: true
channel: rubocop-0-54
scss-lint:
enabled: true
exclude_patterns:
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,8 @@ Style/RegexpLiteral:
Style/SymbolArray:
Enabled: false

Style/TrailingCommaInLiteral:
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: 'comma'

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: 'comma'

0 comments on commit 51b08f5

Please sign in to comment.