Skip to content

Linting markdown fenced code blocks uses embedded tailwind library #471

Description

@snoozbuster

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

0.8.1

What version of Tailwind CSS are you using?

4.3.3

What version of Node.js are you using?

24.1.1

What package manager are you using?

npm

What operating system are you using?

macOS

Reproduction URL

https://github.com/snoozbuster/tailwind-prettier-plugin-repro

To reproduce:

npm install
npm run repro     # prettier input.md  -> warns
npm run control   # prettier input.tsx -> silent

Claude has provided some hypotheses about the root cause in the README.md. I have no idea how accurate it is.

Describe your issue

Formatting a Markdown file that contains a ts / tsx fenced code block which uses the --default() syntax introduced in tailwind 4.3 makes
prettier-plugin-tailwindcss@0.8.1 print

Unsupported bare value data type: "-*".
Only valid data types are: "number", "integer", "ratio", "percentage".

```css
--modifier(number,--default(100)-*)
                                ^^
```

once for every declaration in the stylesheet that uses --default(...) as an argument of
--modifier(...). Formatting the identical code as a real .tsx file prints nothing, and the
stylesheet compiles cleanly under tailwindcss@4.3.3. This occurs even when tailwindcss 4.3.3 is present in the repository as a dependency.

This is probably related to #468, but it's not clear to me if that is a separate issue or not. In my case I don't particularly care if the plugin works inside markdown files, I just don't want it to warn on them like this.

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