dprint / dprint-plugin-typescript

TypeScript and JavaScript code formatting plugin for dprint.
https://dprint.dev/plugins/typescript
MIT License
248 stars 50 forks source link

styled-components support #643

Open adrian-gierakowski opened 1 week ago

adrian-gierakowski commented 1 week ago

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!