-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Describe the Bug
Here's a piece of code from recommended example starter:
---
import astroLogo from "../assets/astro.svg";
import background from "../assets/background.svg";
---
<div id="container">
<img id="background" src={background.src} alt="" fetchpriority="high" />
<main>
<section id="hero">
When running prettier against it the output is:
---
import astroLogo from '../assets/astro.svg';
import background from '../assets/background.svg';
---
<div id="container">
<img id="background" src={background.src} alt="" fetchpriority="high" />
<main>
<section id="hero">
Notice how only the javascript at the top has changed to single quotes and not the rest of the code.
Steps to Reproduce
npm create astro@latest
using template "A basic, helpful starter project"- add
.prettierrc
file to root - add following content to prettier:
{
"singleQuote": true,
"bracketSameLine": true,
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "ignore"
}
- The output you can find above.
lukemartin
Metadata
Metadata
Assignees
Labels
No labels