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

[BUG] The auto-fix for enforces-shorthand incorrectly rewrites p-2 pl-2 pr-2 to just px-2 #182

Closed
cmlenz opened this issue Nov 29, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@cmlenz
Copy link

cmlenz commented Nov 29, 2022

Describe the bug
The auto-fix for enforces-shorthand rewrites p-2 pl-2 pr-2 to just px-2, although p-2 would be correct.

To Reproduce
Steps to reproduce the behavior:

  1. Open a file that is covered by ESLint
  2. Edit a className to say p-2 pl-2 pr-2
  3. Apply auto-fix
  4. The className will now be px-2

Expected behavior
The resulting class name should be p-2

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):
eslint-plugin-tailwindcss version 3.7.0

@cmlenz cmlenz added the bug Something isn't working label Nov 29, 2022
@cmlenz cmlenz changed the title [BUG] [BUG] The auto-fix for enforces-shorthand incorrectly rewrites p-2 pl-2 pr-2 to just px-2 Nov 29, 2022
@francoismassart
Copy link
Owner

Hi @cmlenz,
thank you for reporting the issue.

This was an easy fix.

Available via the latest release

npm i eslint-plugin-tailwindcss@3.7.1

https://github.com/francoismassart/eslint-plugin-tailwindcss/releases/tag/v3.7.1

@cmlenz
Copy link
Author

cmlenz commented Nov 30, 2022

That was quick, thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants