-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Milestone
Description
🔎 Search Terms
"import attributes" "line break" "parse"
🕗 Version & Regression Information
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
💻 Code
import a
from "foo"
with {type: "json"}
I believe this is allowed by the spec.
🙁 Actual behavior
TypeScript fails to parse.
🙂 Expected behavior
No error.
Additional information about the issue
I'm from the Prettier team, we are trying to improve the format of import declarations with multiple attributes.
I was thinking that we can break long declarations before the from
or with
keyword. (Not decided yet)
But since it can't be parsed, so we don't have this option at all.