Skip to content

TSX spread bug still persists. #4872

@Ebuall

Description

@Ebuall

Previous issue is locked #3158

Prettier 1.13.7
Playground link

--parser typescript

Input:

const x = <div>{...[0]}</div>

Output:

const x = <div>{[0]}</div>;

Expected behavior:

const x = <div>{...[0]}</div>;

VSCode-prettier and npx prettier Untitled1.tsx both without any configuration give the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:jsxIssues affecting JSX (not general JS issues)lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!scope:dependencyIssues that cannot be solved inside Prettier itself, and must be fixed in a dependencystatus:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions