rubocop / rubocop-capybara

Code style checking for Capybara files.
https://docs.rubocop.org/rubocop-capybara
MIT License
38 stars 7 forks source link

Remove `Capybara/ClickLinkOrButtonStyle` cop #81

Open ydah opened 8 months ago

ydah commented 8 months ago

https://github.com/rubocop/rubocop-capybara/pull/61#issuecomment-1792041354

Uaitt commented 8 months ago

Hey @ydah,

on the current latest release of rubocop-capybara, this cop default is strict. However, since #76 was merged a month ago, the documentation actually says that the default is link_or_button, even thought a release with that change has not been issued.

Even though you are planning to delete this cop, I think you should at least create a new release with the up to date default - this discrepancy between the cop and the documentation can be a pain to rationalise 😢

zspencer commented 6 months ago

@ydah I would prefer that we keep this cop; but perhaps have it turned off by default? My team loves that we can rely on it to help us make good accessibility decisions when writing end-to-end tests.

Of course, it's also possible that having this in the linter is "too much" and people who like it can make a rubocop-capybara-accessibility gem and include it!

ydah commented 6 months ago

@zspencer I think proceeding in the direction of deleting Capybara/ClickLinkOrButtonStyle while creating a transition destination as follows. If you have any opinions, I would like to hear them.

zspencer commented 6 months ago

@ydah This is great! I love it!