Open mansona opened 2 years ago
While it doesn't look for particular rules, I have implemented a autofix
command in https://github.com/rtablada/pod-workflow-cli which will remove lint ignores for a given file or directory (with CLI input or an interactive file tree using inquirer).
While a some of that tool is currently coupled to a pod structure deprecation/lint flow, there could be prior art there that could be moved into a lint-to-the-future
command
Consideration here though is that LTTF would likely want to move the logic of regex replacement and delegate that to the plugin.
We want to be able to run the command
npx lint-to-the-future remove "rule-name"
and it would remove allrule-name
ignores from every file that it happens in.To be more specific, if you run
npx lint-to-the-future list
and it reported the following:and then you ran the following command:
running
npx lint-to-the-future list
again would report:Implementation considerations:
--all-plugins
or something? maybe this could be the default behaviour??remove()
to the public API of a plugin (and document it in the plugin development guide). This means that there could be plugins installed that don't support thisremove()
functionality. Do we do this with peer dependencies or something to make sure they support the command? or do we just warn the user that they have plugins that don't support it installed with a "update or contact the plugin developers" message.