Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Explain use with RuboCop
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Dec 12, 2020
1 parent a1dd3e4 commit f050286
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,19 @@ Or, they can be passed to `prettier` as arguments:
prettier --ruby-single-quote false --write '**/*.rb'
```

## Use with RuboCop

RuboCop and prettier for Ruby serve different purposes, but there is overlap
with some of RuboCop's functionality.

Prettier provides a RuboCop configuration fle to disable the rules which clash.
To enable, add the following config at the top of your project's `.rubocop.yml`:

```yaml
inherit_gem:
prettier: rubocop.yml
```
## Contributing
Check out our [contributing guide](CONTRIBUTING.md). Bug reports and pull requests are welcome on GitHub at https://github.com/prettier/plugin-ruby.
Expand Down
1 change: 1 addition & 0 deletions prettier.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
node_modules/prettier/index.js
node_modules/prettier/third-party.js
package.json
rubocop.yml
]
end

Expand Down
15 changes: 15 additions & 0 deletions rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Layout:
Enabled: false

Style/MultilineIfModifier: # clashes with rubyModifier
Enabled: false
Style/SymbolArray: # clashes with rubyArrayLiteral
Enabled: false
Style/WordArray: # clashes with rubyArrayLiteral
Enabled: false
Style/TrailingCommaInArguments: # clashes with trailingComma
Enabled: false
Style/TrailingCommaInArrayLiteral: # clashes with trailingComma
Enabled: false
Style/TrailingCommaInHashLiteral: # clashes with trailingComma
Enabled: false

0 comments on commit f050286

Please sign in to comment.