-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Invalid plugin-option value. Expected null, false or "", but received true. #9204
Comments
LOL it's even more funnier
|
I think there are only boolean and string for CLI, Line 839 in 810325d
I'm not sure how we treat |
But what I need here is true, false or something that lets me fall back to a plugin managed value |
I mean cli only accept string and boolean, where does this |
You mean you are searching the code for this? I'm a little bit confused cause my problem doesn't have anything to do with |
I think it's the same thing, what we got for
|
But why is the plain value If this can not be fixed by plugin support in prettier itself, please explain me how I can expect a boolean value that is also nullable or undefinable? I need a better docu for defining options in plugins |
Ah, sorry I misunderstood the problem, I don't know, need investigate. |
Is there a workaround for still having single quotes? |
I also have the same problem. But for |
Still happening for me in prettier v3.0.3 |
Environments:
Steps to reproduce:
I have added aliases for my plugin options so it can better support specific options for pug embedded in vue.
So at first I tried to define an option like:
But then I needed implemented a strategy to fallback to prettier's default/configured values if the aliases are not set.
Therefor I need to have a triple state boolean (
true
,false
,null
)So null is just the default and shut not be set by a customer
But
true
orfalse
should be valid values...false
is working finetrue
results in an error 👀Expected behavior:
true
should be a validchoice
and not be interpreted as""
(empty-string)Actual behavior:
[error] Error: Invalid --pug-single-quote value. Expected null, false or "", but received true.
The text was updated successfully, but these errors were encountered: