Skip to content

[BUG] tailwindcss/enforces-shorthand reports false positive #307

@iscekic

Description

@iscekic

Describe the bug
For some combinations of h- and w- classes, a size- equivalent does not exist, yet the rule reports them as invalid.

To Reproduce

  1. Try setting class values to h-screen w-screen

Expected behavior
No error reported as size-screen doesn't exist per the docs

Screenshots
N/A

Environment (please complete the following information):

  • "eslint-plugin-tailwindcss": "3.14.0"

Additional context
The rule also reports false positives for custom values which don't exist in the tailwind config. Eg, I have 30 and 60 defined for width and height, but not for size - therefore h-30 w-30 can't be replaced by size-30.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions