eslint-rule-composer icon indicating copy to clipboard operation
eslint-rule-composer copied to clipboard

Autofixing?

Open merlinstardust opened this issue 5 years ago • 4 comments

Is there a means to add autofixing to composed rules?

If so, how would I go about doing that.

Specifically I'm looking to autofix no-unused-vars as reported here

merlinstardust avatar May 03 '19 15:05 merlinstardust

There is already a package that just does that. Take a look at eslint-plugin

sweepline avatar Sep 18 '19 09:09 sweepline

That was added after my original question. I would still like to know how I go about doing that so I can learn how to do so for myself

merlinstardust avatar Sep 18 '19 12:09 merlinstardust

Yes, so if you go to my link, and read the code you will se a solution to an autofixer for no-unused-vars written using eslint-rule-composer which I presume was your original question?

sweepline avatar Sep 18 '19 12:09 sweepline

The code technically answers the question but it doesn't walk me through it. I'm hoping for a brief tutorial or blog post on how this works. Reading code is not a substitute for teaching

merlinstardust avatar Sep 18 '19 13:09 merlinstardust