jrdrg / eslint-plugin-sort-exports

ESLint plugin to sort exports in modules
36 stars 9 forks source link

the autofixer messes up JSDoc comments #33

Open Zamiell opened 2 years ago

Zamiell commented 2 years ago

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. :(

jrdrg commented 2 years ago

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

Zamiell commented 2 years ago

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 commented 2 years ago

@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.

jrdrg commented 2 years ago

@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.

Zamiell commented 2 years ago

thank you!