Let Rails/LinkToBlank also catch cases where link_to_if++
is used
#1288
Labels
enhancement
New feature or request
link_to_if++
is used
#1288
Is your feature request related to a problem?
While the cop catches instances where
link_to
is used, it doesnt catch its sister implementationslink_to_if
andlink_to_unless
.Describe the solution you'd like
The same cop should catch
link_to_if
s andlink_to_unless
s matching the conditionsDescribe alternatives you've considered
Implementing a separate cop of a configuration value for the given cop.
Additional context
There is also
link_to_unless_current
which might be more difficult to implement a check against.https://www.rubydoc.info/gems/rubocop-rails/RuboCop/Cop/Rails/LinkToBlank
https://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to
The text was updated successfully, but these errors were encountered: