Skip to content

over-aggressive whitespace removal #337

Open
@oliviertassinari

Description

@oliviertassinari

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%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions