makandra / makandra-rubocop

makandra's default Rubocop configuration
MIT License
6 stars 1 forks source link

Discussion: Rails/LinkToBlank #30

Closed foobear closed 2 years ago

foobear commented 2 years ago

Rubocop expects a rel="noopener" for links with target="_blank" because of legacy security reasons.

app/example.rb:12:34: C: [Correctable] Rails/LinkToBlank: Specify a :rel option containing noopener.
    link_to(text, url, target: '_blank')
                       ^^^^^^^^^^^^^^^^

This is only relevant for IE11, since the HTML spec was changed and all modern browsers have adjusted.

I vote for disabling this cop in our default config, since we by default do not support IE11.

:+1: Disable cop :-1: Keep cop enabled

codener commented 2 years ago

Released as 7.2.0.