-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
develop simplified rubocop config #3
Comments
First, there is a default .rubocop.yml config now. These gems need to be added to the Gemfile for it to work:
Using the default rails config in Ragu's base Ruby on Rails repository lessens the number of rubocop offences from 388 to 193 and gets rid of pretty much all non-autocorrectible offences.
Next, the big offenders are:
and
Regarding the latter, it is completely autocorrectible, and perhaps it would be beneficial for consistency's sake to enforce one or the other (the default for rails is double quotes unless single quotes are used within double quotes).
Below is the terminal output for the remaining 8 offences.
|
Thanks for investigating this @SaraDawner2000. Reading through this I'm thinking it might make sense to include this in the rails template https://github.com/appdev-projects/rails-7-template. I'll create an issue to see what first draft thinks. appdev-projects/rails-7-template#44 Otherwise, we'll add some guidelines to this lesson. |
I think this will help for a baseline https://gorails.com/episodes/omakase-rubocop-linter-rules-for-rails |
Reasonably good starting point https://github.com/rails/rubocop-rails-omakase |
any @DPI-WE/technical-associates want to replace rubocop section with this ^^ |
In the Rails 7 Template gemfile? |
no, this lesson. |
including the rubocop rails gem in the Gemfile with
Worked great for me in the final project. The only adjustments I had to make to the .rubocop.yml file was changing the frozen string literal rule and excluding the Gemfile.lock:
|
I need permissions for the repo, but I have a PR ready to go when I have them |
try now |
want to give it a try @SaraDawner2000 ?
The text was updated successfully, but these errors were encountered: