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
then run a codemod to move the declaration into the function, it produces this code:
functionf(){consts=` a `;}
This incorrectly changes the value of s to have two spaces before the "a" and two spaces at the end of the string. Instead, the indentation logic should be smart enough to not touch lines where the start of the line is inside a multiline string literal.
If I start with this code:
then run a codemod to move the declaration into the function, it produces this code:
This incorrectly changes the value of
s
to have two spaces before the "a" and two spaces at the end of the string. Instead, the indentation logic should be smart enough to not touch lines where the start of the line is inside a multiline string literal.jscodeshift demo:
https://astexplorer.net/#/gist/572d85770a3af8257ec361968104b377/08e0bd4baf85bee6513a1349da98ce104c183860
The text was updated successfully, but these errors were encountered: