We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With newer version of svelte 5, function bindings allows you to do this:
<input bind:value={get, set} />
Prettier is automatically adding parentheses:
<input bind:value={(get, set)} />
which throws a svelte error:
`bind:value={get, set}` must not have surrounding parentheses https://svelte.dev/e/bind_invalid_parens [bind_invalid_parens]
I am using:
"prettier": "3.4.2", "prettier-plugin-svelte": "3.3.2", "svelte": "5.15.0"
{ "singleQuote": false, "trailingComma": "none", "printWidth": 80, "plugins": ["prettier-plugin-svelte"], "overrides": [ { "files": "*.svelte", "options": { "parser": "svelte" } } ] }
The text was updated successfully, but these errors were encountered:
Temporally workaround:
{/* @ts-ignore */ null} <!-- FIXME remove after resolve issue prettier-plugin-svelte#477 --> <!-- prettier-ignore --> <input bind:value={() => void, null} />
ts-ignore for second nullish set arg
nullish
Sorry, something went wrong.
Please provide a repository reproduction, this should work (not able to reproduce)
After updating dependencies and restarting vscode everything is ok. It can be closed
No branches or pull requests
With newer version of svelte 5, function bindings allows you to do this:
Prettier is automatically adding parentheses:
which throws a svelte error:
I am using:
The text was updated successfully, but these errors were encountered: