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
I'm writing some application with svelte and TypeScript. And there is a component that is supposed to print code that it was passed from props. Code is usually not formatted so I'm using Prettier to format it at runtime and highlight.js to paint it.
It works perfectly fine. I imported firstly babel plugin and error in the browser said that I also need estree. I imported it and error disappeared and there is no more errors in browser. But typescript now throws an error about estree import: File '.../node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.d.ts' is not a module.ts(2306)
I suppose error happens because estree.d.ts is empty.
Just in case here is an entire code of the component:
Environments:
Steps to reproduce:
I'm writing some application with svelte and TypeScript. And there is a component that is supposed to print code that it was passed from props. Code is usually not formatted so I'm using
Prettier
to format it at runtime andhighlight.js
to paint it.It works perfectly fine. I imported firstly
babel
plugin and error in the browser said that I also needestree
. I imported it and error disappeared and there is no more errors in browser. But typescript now throws an error aboutestree
import:File '.../node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.d.ts' is not a module.ts(2306)
I suppose error happens because
estree.d.ts
is empty.Just in case here is an entire code of the component:
Expected behavior:
Proper import without any errors.
Actual behavior:
TypeScript error has type error, but works fine.
The text was updated successfully, but these errors were encountered: