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
Using a shorthand attribute with JSX in a conditional expression will result in an error.
--- const content = {}; const enable = true --- {enable && <MyHeader {content} />}
https://stackblitz.com/edit/github-prettier-plugin-astro-demo-klsxqv?file=src%2Fpages%2Findex.astro
No error will occur if the shorthand is not used.
--- const content = {}; const enable = true --- {enable && <MyHeader content={content} />}
I made it possible to check with stackblitz. In the demo, if there is no error, the formatted code will be displayed.
The text was updated successfully, but these errors were encountered:
Error: unhandled node type: 'expression'
Remove props shorthand so that prettier plugin works
61480a9
See withastro/prettier-plugin-astro#224.
prettier-plugin-astro
Successfully merging a pull request may close this issue.
Describe the Bug
Using a shorthand attribute with JSX in a conditional expression will result in an error.
https://stackblitz.com/edit/github-prettier-plugin-astro-demo-klsxqv?file=src%2Fpages%2Findex.astro
No error will occur if the shorthand is not used.
Steps to Reproduce
I made it possible to check with stackblitz.
In the demo, if there is no error, the formatted code will be displayed.
https://stackblitz.com/edit/github-prettier-plugin-astro-demo-klsxqv?file=src%2Fpages%2Findex.astro
The text was updated successfully, but these errors were encountered: