-
Notifications
You must be signed in to change notification settings - Fork 659
🐛 quoteStyle
is ignored for noUnusedTemplateLiteral
suggestion
#4448
Comments
quoteStyle
is ignored for noUnusedTemplateLiteral
suggestion
This should be fixed; you could try one of the latest nightlies. We are going to make a release soon: #4344 |
@ematipico This doesn't seem to be fixed, I just tried the playground for the PR you linked and it still displays double quotes when single quotes is specified. |
Have you tried one of the nightlies? The playground doesn't show the final fixes. The final fixes pass through the formatter when you apply the fixes, if the formatter is enabled. |
@ematipico I just tried v12.0.0-nightly.ff02317 locally, the issue is still present in the suggestion output but works upon applying. Thanks! |
I'm sorry to report that this issue still occurs for me in vscode, using v12.1.3-nightly.4c8cf32 with extension v0.25.20230719. I have this relevant section in .json:
I'm not sure if it's because of the extension or not. However, the |
Can someone create a reproduction? I am going to leave it open for a bit, but without a reproduction it would be difficult to help |
How would I do that?
By the way, how do I enable debug tracing? I can try to dig around after I
do that to see what's going on between vscode and the language server.
…On Sun, Jul 30, 2023, 02:01 Emanuele Stoppa ***@***.***> wrote:
Can someone create a reproduction? I am going to leave it open for a bit,
but without a reproduction it would be difficult to help
—
Reply to this email directly, view it on GitHub
<#4448 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWCYT3UND4RGBGQ2SBV4KTXSX2DZANCNFSM6AAAAAAX3ABWWQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@kamiyo you can use the playground: set the correct options, a code sample and share the URL here. Make sure to check that the formatted output is incorrect. If the playground doesn't have the bug, then you'll have to create a small repository. |
I'll try it. By the way, this happens when using vscode code actions to fix
the error (context menu / Ctrl + .). If I then format the line, it then
changes the " to '. So I'm not sure this problem is going to show up on the
playground.
…On Sun, Jul 30, 2023, 10:24 Emanuele Stoppa ***@***.***> wrote:
@kamiyo <https://github.com/kamiyo> you can use the playground
<https://docs.rome.tools/playground/>: set the correct options, a code
sample and share the URL here.
—
Reply to this email directly, view it on GitHub
<#4448 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWCYT3KNM525KJTEG74QLTXSZVARANCNFSM6AAAAAAX3ABWWQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Oh, now I see what you mean. That's expected by design. The linter doesn't know anything about the formatter, so it applies code actions using the hardcoded values. Probably we might be able to call the formatter when applying the code actions in the LSP, but I would consider this an enhancement and not a bug. |
Ah ok, didn't realize that was the case. Would it be appropriate to add
that to the vscode extension docs (or is it already there and I missed it?
…On Sun, Jul 30, 2023, 12:18 Emanuele Stoppa ***@***.***> wrote:
Oh, now I see what you mean.
That's expected by design. The linter doesn't know anything about the
formatter, so it applies code actions using the hardcoded values.
Probably we might be able to call the formatter when applying the code
actions in the LSP, but I would consider an enhancement and not a bug.
—
Reply to this email directly, view it on GitHub
<#4448 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWCYT42CWJPZ5GHQYW6VFDXS2CNZANCNFSM6AAAAAAX3ABWWQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Environment information
What happened?
single
quote style and performing a lint check which returns anoUnusedTemplateLiteral
warning suggests double-quotes due to: https://github.com/rome/tools/blob/main/crates/rome_js_factory/src/make.rs#L22 which is hard-coded to double quotes. It should really use the specified quote style.Expected result
noUnusedTemplateLiteral
suggestion should use the specifiedquoteStyle
Code of Conduct
The text was updated successfully, but these errors were encountered: