0

I am using Prettier for formatting HTML code in Lightning web component but it is adding quotes around properties. This is not required for LWC and it throws an error.

I tried different Quote Props options (not sure if it is the right approach), but it didn't work.

Any help would be appreciated, Thanks!

3

Follow this. You have to override the html formatter with lwc as parser - note that it will not retrospectively "fix" your markup which means the quotes will stay but at least it should not add them after reformatting again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.