-
-
Notifications
You must be signed in to change notification settings - Fork 43
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: Unable to pass inlined object literal to custom vue directive #419
Comments
So the error happens here: Line 711 in aed6523
If I log the error, here is what I get. It seems curious that the angular parser is used for a Vue directive?
|
The error makes you think that the problem is the |
Would you like to tackle this issue? |
I could try, but I don't really know enough about the current workings. It seems to me that using the angular parser is not a bug, but by design? There's no parser for vue directives? |
To be fair, I would have the exact same amount of work as you if I would tackle that. Also I just remember that I needed to handle it kinda like that as if I would first use vue parser it would break angular. |
Hmm it's more complicated. This only appears to be happening when running through |
Ah no I was running on an outdated code base. The warning started appearing with this commit: f5e5ef1 But for some reason more recently this is now seen as an error in our project, while before it was just a warning. I still don't quite understand that part. |
Ok I'm slowly getting there.. So the warning doesn't appear for some reason in the So it seems |
/cc @simonhaenisch |
Hmmm so setting |
I don't know what more to do here. With #420 merged, I would manage to write a test that spits out this warning, but it only does so because it's using the wrong setting for I think #420 should be merged, and But none of these things are crucial for my work because I now found out that setting |
But are SFC not only for
Do be honest, that is exactly why this option exists and why it can be set manually |
This setting didn't exist when I set up the config 2 years ago. Then the warning started popping up at one point and with a more recent prettier update it turned into an error somehow. Sure there's a documentation for this now, but that's not necessarily where I start looking since this used to work without it. |
Yea I guess it should pass down whatever file the pug is contained in as |
Yeah it does, it's mentioned in the readme ("Caveat" section). The plugin imports a bunch of built-in parsers and re-exports them after enriching them with a |
Plugin Version
v2.3.0
Prettier Version
v2.7.1
Which frameworks are affected?
Node Version
v18.12.0
Which operating systems have you used?
Prettier config
Input
Output or Error
Expected Output
Additional Context
No response
The text was updated successfully, but these errors were encountered: