You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which is very much undesired (turns code into an unreadable mess, with an IIFE and this.).
Can't speak of possible performance improvements, but not worth the readability sacrifice.
If this is indeed desired behavior, I would just disable the rule. If not, posting it here to notify you of this behavior.
The text was updated successfully, but these errors were encountered:
maxpatiiuk
changed the title
Autofix for array-func/from-map results in undesirable behavior.
Autofix for array-func/from-map results in undesirable behavior
Jan 7, 2023
I see. Would it be better to disable auto-fix in cases where the auto-fix produces unreadable code?
Just for reference, the autofixed code also creates typescript errors:
Along with several ESLint errors:
Or at least, could you make this behavior an option that can be turned off?
Version: 3.1.8
ESLint: 8.31.0
Node.js: 19.3.0
For the following code:
ESLint reports:
for the
Array.from(
line.The autofix turns the above into:
Which is very much undesired (turns code into an unreadable mess, with an
IIFE
andthis
.).Can't speak of possible performance improvements, but not worth the readability sacrifice.
If this is indeed desired behavior, I would just disable the rule. If not, posting it here to notify you of this behavior.
The text was updated successfully, but these errors were encountered: