eslint-plugin-sort-exports icon indicating copy to clipboard operation
eslint-plugin-sort-exports copied to clipboard

the autofixer messes up JSDoc comments

Open Zamiell opened this issue 2 years ago • 5 comments

When the rule fixer moves a function, it leaves the JSDoc comment behind, making this plugin unusable currently, because I have my ESLint configured to fix on save. :(

Zamiell avatar Jul 18 '22 23:07 Zamiell

Whoops 😅 I'll try to take a look at this soon, sorry about that!

jrdrg avatar Jul 30 '22 14:07 jrdrg

Thanks!

Also, I think the linter should move both JSDoc comments and leading line comments, like this:

// This function is for fooing things.
function foo() {}

Zamiell avatar Jul 30 '22 20:07 Zamiell

@jrdrg Can you please push a release that disables the autofixer? It is so destructive that it prevents me from using the plugin at all.

Zamiell avatar Sep 26 '22 08:09 Zamiell

@Zamiell Sorry for taking so long, but I published v0.8.0 which adds a "disableAutofixer" option and also adds some code to move comments.

jrdrg avatar Nov 12 '22 20:11 jrdrg

thank you!

Zamiell avatar Nov 12 '22 21:11 Zamiell