-
-
Notifications
You must be signed in to change notification settings - Fork 2
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] readable-tailwind/multiline weird autofix behavior #57
Comments
Hi, thank you for the detailed error report. I am currently on vacation. I will be able to look into it in 3 weeks. |
I tried to look into this today, but I'm having trouble to reproduce the error. Are you using the latest version of the plugin? I remember having this issue in older versions. Can you post the output of |
@schoero sorry for the long wait, was working on a complex feature. I am definitely using the latest version of the plugin. I could create a reproduction repo later in the week. |
I published a new version. It does not fix the issue, but it provides better warnings and displays the before and after of the tailwind class string. Maybe this can give us enough insights before you try to create a reproduction. |
I ran into a similar issue today and published a fix for it in v1.8.2. If this issue still persists after upgrading to v1.8.2, feel free to reopen. |
Hi, I am using this plugin in a project with typescript and react, using legacy eslint config. There is a weird issue with the
readable-tailwind/multiline
rule in one particular situation which is repeated across different components in the project.Component sample code:
.eslintrc.json
The problem
The auto fix first suggests the following change with the message
Incorrect line wrapping: "text-primary absolute bottom-1 right-0.5 !h-4 !w-4"
:But then it suggests reverting it back to the first code snippet with the message :
Unnecessary line wrapping: "\n text-primary absolute bottom-1 right-0.5 !h-4 !w-4\n "
Also, I do believe this is the reason for heap out of memory crit when running eslint on this project:
![image](https://private-user-images.githubusercontent.com/12977031/367126114-4c4d121b-9e42-466e-aaf1-70f3227305c0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzcwNTYsIm5iZiI6MTczOTY3Njc1NiwicGF0aCI6Ii8xMjk3NzAzMS8zNjcxMjYxMTQtNGM0ZDEyMWItOWU0Mi00NjZlLWFhZjEtNzBmMzIyNzMwNWMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAzMzIzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYzZmFjZDM2MGU2ZDQ2ODYwNjIzYTQ1NjUxMjY2MDFlYzQzMWU0MWM2NGQ5OWY1YWExNWFmOWQxOTc2NzNhYzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JnAc4c3EskacGfT_NvXVR4iCSTdTPpNeljOioUhB4aI)
Final comments
Also, I believe I should mention that the project in question is a part of nx monorepo with 12 other projects, all of which run and apply autofix no problem. I think there is an issue with the exact number for line wrapping not being handled correctly, although the number of symbols for the string in question is 90 with left spaces and 82 without.
The text was updated successfully, but these errors were encountered: