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:
Sample code after formatting using
@prettier/plugin-ruby3:This is triggering Rubocop, even after including this gem's config:
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:
do … endagain (but this might not be safe if I understand Transform between braces & do/end when reflowing blocks? #120 correctly)