New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce no mix interpolation #19700
Enforce no mix interpolation #19700
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not convert all these to %s
strings?
@jridgewell do you mean for the whole codebase? The was the original plan. but now we want to allow template literals if the user wants to since we can generate the string format message ( |
No, I mean these corrected uses. If we're just gonna convert them in the transformer, why not convert them now? |
@jridgewell thats fair. will fix |
@jridgewell done |
dd2718f
to
d7887dd
Compare
dbcc962
to
29e4701
Compare
Instead of outright banning non literal strings, we just want to make sure the user doesn't interleave template literal interpolation and strformat style interpolation as this makes the transformers job of tracking positioning harder.
29e4701
to
15bb0b7
Compare
* enforce no mixing of interpolation styles * refactor the no-non-string-log-args lint rule to no-mixed-interpolation Instead of outright banning non literal strings, we just want to make sure the user doesn't interleave template literal interpolation and strformat style interpolation as this makes the transformers job of tracking positioning harder. * switch to strformat the mixed call sites * skip failing test
Instead of outright banning non literal strings, we just want to make sure the user doesn't interleave template literal interpolation and strformat style interpolation as this makes the transformers job of tracking positioning harder.