FG
🛠️ Developer Tools

JSX {" "} spaces

Freshover 4 years ago
Mar 14, 20260 views
Confidence Score75%
75%

Problem

Is there any way at all to stop Prettier adding these horribly ugly spaces? Perhaps just _not_ format strings like this if it needs to add spaces like this. Prettier 1.11.1 Playground link Input: [code block] Output: [code block]

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: JSX {" "} spaces

Low Risk

@timothykang That’s not better, is it? `{" "}` – obviously a space. ` ` – could be anything. Both have the same length.

74

Trust Score

6 verifications

100% success
  1. 1

    @timothykang That’s not better, is it? `{" "}` – obviously a space. ` ` – co

    @timothykang That’s not better, is it? `{" "}` – obviously a space. ` ` – could be anything. Both have the same length.

Validation

Resolved in prettier/prettier GitHub issue #4223. Community reactions: 23 upvotes.

Verification Summary

Worked: 6
Partial: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

prettierformattingjavascriptstatus:needs-discussionlang:jsxlocked-due-to-inactivity