You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SyntaxError: Type parameter list cannot be empty. (20:6)
at constructor (/Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:359:19)
at TypeScriptParserMixin.raise (/Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:3266:19)
at TypeScriptParserMixin.tsParseTypeParameters (/Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:7803:12)
at /Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:9448:29
at TypeScriptParserMixin.tryParse (/Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:3604:20)
at TypeScriptParserMixin.parseMaybeAssign (/Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:9446:24)
at /Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:10353:39
at TypeScriptParserMixin.allowInAnd (/Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:11955:12)
at TypeScriptParserMixin.parseMaybeAssignAllowIn (/Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:10353:17)
at TypeScriptParserMixin.parseParenAndDistinguishExpression (/Users/prb/Projects/prb-longevity/node_modules/@babel/parser/lib/index.js:11214:28)
The text was updated successfully, but these errors were encountered:
Your Environment
Describe the bug
I cannot format a file that contains an empty React component, i.e.,
<> ... </>
To Reproduce
Copy the code below into a TypeScript project and try to format it with Prettier.
You can go through the Docusaurus installation for a quickstart.
Expected behavior
The file should be formattable. If I disable the plugin, I can format the file just fine.
Code sample
See line 20 here:
See code sample
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
Toggle to see it:
Details
Prettier config:
Error log
The text was updated successfully, but these errors were encountered: