-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
[prettier-plugin-sql] Invalid paramTypes value. Expected , but received { named: [":"] }. #233
Comments
Did you try https://github.com/sql-formatter-org/sql-formatter itself? This plugin is just a simple wrapper of it. I don't have much time for OSS due to business these days, so PR welcome. |
prettier/packages/sql/src/index.ts Lines 313 to 326 in 79e2df6
It seems the definition is incorrect. |
Running into the same issue. it does appear that this is a valid config for that option: https://github.com/sql-formatter-org/sql-formatter/blob/master/docs/paramTypes.md#option-value. I'm trying to configure via .prettierrc: {
"overrides": [
{
"files": "*.sql",
"options": {
"language": "postgresql",
"paramTypes": {
"numbered": ["$"],
"named": ["@"]
}
}
}
]
} If I remove the |
Hey @JounQin , |
Also seeing this error.. any updates here? |
For anyone still looking for a solution, I removed prettier-plugin-sql and did this. |
blocked by prettier/prettier#14671 |
I used pnpm's package patch functionality to force the options to be passed manually here as a temporary workaround: index.cjs
->
|
Burned by this myself, just gonna use the patch above.. |
I got an idea that we can parse string config instead and |
Hello and thanks for this awesome plugin.
I am trying to configure the
paramTypes
option as defined in sql-formatter, but when I do:I get the following error when running prettier:
I am not sure why or how to fix it.
The text was updated successfully, but these errors were encountered: