question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Figure out & document how to disable RuboCop's styling rules

See original GitHub issue

Welcome to the prettier org! So awesome.

As this project likely to live along-side RuboCop in Ruby projects we’ll need to either document how to ensure that the two projects don’t clash, or build something similar to https://github.com/prettier/eslint-plugin-prettier to ensure the two don’t step on each others toes.

Ideas:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:22 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
aergonautcommented, Feb 12, 2019

This project could ship a gem called like rubocop-config-prettier that contains rubocop.yml files disabling the style rules. Then projects wanting to Prettier along with Rubocop could use inherit_gem to inherit the config:

inherit_gem:
  rubocop-config-prettier: config/rubocop.yml

This would be like how ESLint users have to install a config plugin and update their ESLint config files to integrate with Prettier. I like the idea of shipping a gem containing a config better because it feels more “right” to install Rubocop config using gems instead of npm.

To solve the Rubocop version compatibility issue, if there are versions of Rubocop that introduce config file incompatibilities, the rubocop-config-prettier gem could start shipping alternate rubocop.yml files tailored to different versions. So say starting Rubocop 0.45 there’s a compatibility change, the gem could start including a rubocop-0.44.yml file that would work for versions of Rubocop before the change, and rubocop.yml would be for the latest version.

2reactions
kddnewtoncommented, May 28, 2019

@flyerhzm sorry I’m not sure I understand why you would want to pull in a separate gem, why wouldn’t you just open a PR here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration :: RuboCop Docs
Running rubocop --autocorrect --disable-uncorrectable will create comments to disable all offenses that can't be automatically corrected.
Read more >
Rubocop, how to Disable/Enable cops on blocks of code
I answer my question because it is always very difficult for me to find the reference to this solution: # rubocop:disable ...
Read more >
[Fix] Missing Top Level Class Documentation Comment ...
This post shows three different ways to fix rubocop missing comment or disable warning: "Missing top-level class documentation comment".
Read more >
RuboCop | RubyMine Documentation - JetBrains
Go to the Editor | Inspections page and enable/disable the RuboCop inspection under Ruby | Gems and gem management. If necessary, enable the...
Read more >
Rubocop - 4 ways to reduce your frustration! | Hanami Mastery
First thing that come to my mind when I'm forcing my brain to figure out ... code-style rules, you find yourself the only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found