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
Svelte allows for components with two script tags, so long as one is a <script module>.
<script lang='ts' module>
...
<script lang='ts'>
If you do this however, prettier complains and will stop formatting documents, saying: ParseError: A component can only have one instance-level <script> element
The solution is to use deprecated syntax to achieve the same result:
However this produces a svelte linter warning at the top of the documents: context="module" is deprecated, use the 'module' attribute instead
After making this change, prettier formatting starts working again.