Skip to content

Truncated element names that contains hyphen as Vuetify widgets #494

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

Closed
crystalfp opened this issue Jan 6, 2025 · 10 comments
Closed

Truncated element names that contains hyphen as Vuetify widgets #494

crystalfp opened this issue Jan 6, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@crystalfp
Copy link

Describe the bug
If the element in the template part of a .vue file contains an hyphen, the error message shows only the first part of the element name. This happens with Vuetify widgets that have names like v-dialog

To Reproduce
Steps to reproduce the behavior:

  1. What is the exact code you are analyzing?
    A vue file containing:
<template>
<v-dialog v-model="isOpen" width="26rem">
</v-dialog>
</template>
  1. What is the output you are getting?
-  vue-strong ~ multi-attribute elements
   src\components\About.vue
   👉 Elements with multiple attributes should span multiple lines, with one attribute per line.
   Element <v> should have its attributes on separate lines 🚨

Expected behavior

 Element <v-dialog> should have its attributes on separate lines 🚨

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

Used version number of vue-mess-detector:
0.66.0

Used version number of node & npm:

  • node: 23.4.0
  • npm: 11.0.0

Additional context
Add any other context about the problem here.

@crystalfp crystalfp added the bug Something isn't working label Jan 6, 2025
@rrd108
Copy link
Owner

rrd108 commented Jan 6, 2025

Are you willing to send a PR with the fix or a failing test?

@crystalfp
Copy link
Author

Trying to prepare a failing test, but outside my application, the tool simply hangs. Is there a way to understand what is missing in my test?

@rrd108
Copy link
Owner

rrd108 commented Jan 6, 2025

All the tests follows more or less the same pattern.
The best approach would be take the existing test file for the rule and add a new test to it.
If you share your code here or at discord I will take a look. Maybe I can spot the reason of the hanging.

@crystalfp
Copy link
Author

Here is my example (rename it to About.vue):
About.txt
I don't have loaded Vuetify (that provides the v-* elements).
Then npx vue-mess-detector analyze About.vue
Hope it helps.

@rrd108 rrd108 closed this as completed in ad844c6 Jan 9, 2025
@rrd108
Copy link
Owner

rrd108 commented Jan 9, 2025

Thanks. It should be fixed in 0.67.0

Let's slap into the code!

@crystalfp
Copy link
Author

Sorry, the problem is still in 0.67.0

-  vue-strong ~ multi-attribute elements
   src\components\About.vue
   👉 Elements with multiple attributes should span multiple lines, with one attribute per line.
   Element <v> should have its attributes on separate lines 🚨

@rrd108
Copy link
Owner

rrd108 commented Jan 9, 2025

Ah really? My test case passed.
I will take a look, thanks for the feedback

@rrd108 rrd108 reopened this Jan 9, 2025
@crystalfp
Copy link
Author

This is the complete file that generates the error:
About.txt

@rrd108
Copy link
Owner

rrd108 commented Jan 9, 2025

I was not able to reproduce the error. I get the proper element names in the latest release.

Képernyőkép 2025-01-09 16-58-56

I just added line numbers, it is not yet in the latest release.

How did you upgraded form 0.66.0 ?

@crystalfp
Copy link
Author

Sorry sorry! I updated vue-mess-detector on the wrong application. Indeed it works perfectly.
Thanks for your patience!

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