Summary
Using the new Web Console (Beta) to complete a Trailhead challenge is awesome! Much better than building a temporary connection to my computer via the CLI.
When working through this, https://trailhead.salesforce.com/content/learn/modules/javascript-developer-certification-maintenance-summer-25/put-html-class-binding-into-practice?trail_id=maintain-your-salesforce-certifications, I saved the HTML file and where I had set the attribute as class={computedClassNames}, Prettier reformatted to class="{computedClassNames}".
I'm unable to install additional modules to get this setup correctly on my own, I would also really expect this to be setup correctly from the start in this context.
Steps To Reproduce:
- Enable and open Web Console.
- Complete the linked Trailhead.
- When saving the changes to the HTML for the final challenge, the content is corrupted.
Expected result
I would expect the template syntax to be left unquoted. This is because Prettier is using the HTML parser when it should be using the LWC parser.
Additional information
Correct LWC Prettier setup is documented here: https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/prettier.html
Salesforce Extension Version in VS Code:
Web Console
Summary
Using the new Web Console (Beta) to complete a Trailhead challenge is awesome! Much better than building a temporary connection to my computer via the CLI.
When working through this, https://trailhead.salesforce.com/content/learn/modules/javascript-developer-certification-maintenance-summer-25/put-html-class-binding-into-practice?trail_id=maintain-your-salesforce-certifications, I saved the HTML file and where I had set the attribute as
class={computedClassNames}, Prettier reformatted toclass="{computedClassNames}".I'm unable to install additional modules to get this setup correctly on my own, I would also really expect this to be setup correctly from the start in this context.
Steps To Reproduce:
Expected result
I would expect the template syntax to be left unquoted. This is because Prettier is using the HTML parser when it should be using the LWC parser.
Additional information
Correct LWC Prettier setup is documented here: https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/prettier.html
Salesforce Extension Version in VS Code:
Web Console