Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

styled-components support #643

Open
adrian-gierakowski opened this issue Jun 25, 2024 · 1 comment
Open

styled-components support #643

adrian-gierakowski opened this issue Jun 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@adrian-gierakowski
Copy link

I'm considering switching from prettier do dprint on a frontend react project, but one thing is stopping me: pettier formats code in tagged templates for styled-components but dprint doesn't

for example, the following:

import styled from 'styled-components'

const Header = styled.div`
  height: 40px;  padding: 0 15px;
  display: flex;          align-items: center;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
`

gets formatted by prettier as follows:

const Header = styled.div`
  height: 40px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
`;

but not by dprint

Is there every any chance for dprint-plugin-typescript to add support for this? Thanks!

@dsherret dsherret added the enhancement New feature or request label Jul 29, 2024
@adrian-gierakowski
Copy link
Author

I wonder if it would be possible to delegate formatting of these to prettier (or any other pluggin) while using dprint for everything else? If something like this could be done in a general and configurable way it would help fill in missing functionality until it’s added to dprint itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants