Closed wdoug closed 4 years ago
Nice catch, @wdoug. There are always edge-cases and as you mentioned in your other filed issues, infinite ones for this one. Thanks for helping this plugin to become more robust. Good idea to use the new suggestion API which I was unaware of until you mentioned it.
I just tried to add this plugin to our codebase and noticed that if with code like this:
The autofix for the
yield-effects
rule will update code to be:There are two less than ideal things here, so I'll open a second issue for the second request, but the first is that the runtime functionality of the code is changed. The eslint best practices for applying fixes say this:
As of eslint 6.7 (released Nov 2019), there is a new suggestions API that allows editors to provide an optional ability for users to apply fixes that could change the underlying code functionality.