Skip to content

Forced line-breaks in JSX interpolations #767

@mindplay-dk

Description

@mindplay-dk

I have code like this:

export const Container = styled.div<{ bottomDistance?: number }>`
  ${({ bottomDistance }) => css`
    position: relative;
    bottom: ${bottomDistance ?? 40}px;
  `}
`

dprint forces it into this:

export const Container = styled.div<{ bottomDistance?: number }>`
  ${({ bottomDistance }) =>
  css`
    position: relative;
    bottom: ${bottomDistance ?? 40}px;
  `}
`

I'm not opinionated about this stuff - this might even be better, but I'm trying to migrate a project from prettier to dprint, and I'd like to create as little chaos as possible.

I tried the playground, and I've read through the docs for available options, but I can't seem to turn this off?

Is there any way to "debug" changes like these, to see which rule is causing the change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions