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

over-aggressive whitespace removal #337

Open
oliviertassinari opened this issue Dec 27, 2024 · 1 comment
Open

over-aggressive whitespace removal #337

oliviertassinari opened this issue Dec 27, 2024 · 1 comment

Comments

@oliviertassinari
Copy link

oliviertassinari commented Dec 27, 2024

What version of prettier-plugin-tailwindcss are you using?

v0.6.9

What version of Tailwind CSS are you using?

v3.4.17

What package manager are you using?

pnpm

Reproduction URL

import * as React from 'react';

const isExtendable = false;

export default function BasicAlerts() {
  return (
    <div
      className={`MuiApi-item-root${isExtendable ? ' MuiApi-item-header-extendable' : ''}`}
    />
  );
}

Describe your issue

The above code snippet is converted into:

-      className={`MuiApi-item-root${isExtendable ? ' MuiApi-item-header-extendable' : ''}`}
+      className={`MuiApi-item-root${isExtendable ? 'MuiApi-item-header-extendable' : ''}`}

This is similar to #328.

One workaround in the meantime is to add // prettier-ignore.


Off-topic Adding this plugin increase prettier run time by 44%.

@thecrypticace
Copy link
Contributor

I'll look into this soon.

Off-topic Adding this plugin increase prettier run time by 44%

I'm not surprised it increases the time it takes to run Prettier but I am surprised it's by this much wow. I'll have to take a look at this too. 😱

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

No branches or pull requests

2 participants