eslint-plugin-test-selectors icon indicating copy to clipboard operation
eslint-plugin-test-selectors copied to clipboard

Remove auto-fix

Open levaleks opened this issue 1 year ago • 1 comments

Hi! As I told you before, thank you for a great plugin.

There is one thing that I haven't noticed earlier (it's only mentioned in the changelog) but become a big deal now. AFAIK there is no way to disable the auto-fix option per plugin on the .eslintrc level by design. Many projects have lint-staged with eslint --fix option, or auto fix enabled on save in IDE, and the last thing you want to see in the codebase is a random unconfigurable testid :(

It's a big no-go for adoption :/

cc @bkonuwa @pixelbandito

levaleks avatar Dec 07 '23 15:12 levaleks

Hey @levaleks, I helped with that feature, but I'm not the project owner; so ultimately not my call. I might be missing something here, but I think the auto-fix capability still makes sense. Why do you have this lint rule turned on at all if you don't require test IDs? If you want to require test IDs in a project to match a particular pattern, your team can apply whatever test ID they want; and the auto-fix should leave it alone after that.

I think in general test IDs don't need to be semantic, they just need to be uniquely addressable so automated tests can refer to them. Random IDs were a big help for our QA team, but I recognize that was just one way of working.

Thanks for the feedback, and I for one would be interested to understand more about the issues this is causing you.

I would be interested in adding a type: "suggestion", to the rule definition as per the docs at ESLint : Custom Rules : Rule Structure. Then users could use the fix type option to skip fixing this rule.

pixelbandito avatar Mar 31 '24 17:03 pixelbandito