language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Single quotes for HTML Attributes

Open itsezc opened this issue 2 years ago • 1 comments

Description

Consistent formatting is not supported where single quotes are used universally, its possible to use them for JS / TS but not for HTML attributes, atleast without prettier in VSCode (and other IDEs).

Proposed solution

It'd be nice if the formatting is consistent WRT to single quotes even with HTML attributes, in VSCode there are settings that expose this.

Alternatives

Use prettier, but this is an external dependency.

Additional Information, eg. Screenshots

No response

itsezc avatar Jul 15 '23 12:07 itsezc

While single quotes in attributes are valid HTML, note that Prettier always uses double quotes when formatting HTML, and since SvelteKit's default .prettierrc uses single quotes this would surprise a lot of devs.

KTibow avatar Jul 15 '23 13:07 KTibow