Open
Description
Sample code after formatting using @prettier/plugin-ruby
3:
if current_user&.admin? ||
Rails.application.config.x.team_ips.any? { |i|
i.include?(request.remote_ip)
}
Rack::MiniProfiler.authorize_request
end
This is triggering Rubocop, even after including this gem's config:
app/controllers/application_controller.rb:62:51: C: [Correctable] Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
Rails.application.config.x.team_ips.any? { |i|
The original code (formatted by the Prettier plugin v2) cas using do … end
, which did not trigger Rubocop.
I am not sure what is the correct fix here:
- Format the code to use
do … end
again (but this might not be safe if I understand Transform between braces & do/end when reflowing blocks? #120 correctly) - Have the Rubocop config ignore this rule, as this gem will format it correctly
Metadata
Metadata
Assignees
Labels
No labels