Skip to content
New issue

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

Svelte Beta in VS Code broken when using <Script> component #100

Closed
elgertam opened this issue May 20, 2020 · 1 comment
Closed

Svelte Beta in VS Code broken when using <Script> component #100

elgertam opened this issue May 20, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@elgertam
Copy link

Describe the bug
Our project has a component named Script. When we instantiate that component, VS Code shows dozens of errors from the Svelte lang server. Renaming the component to something like MyScript before instantiation removes all errors.

To Reproduce
Steps to reproduce the behavior:

  1. Create the following files in a Svelte project:

Script.svelte:

<script>
  export let title = 'Working Draft';
  export let you = 'you';
</script>

<p>A film named {title} starring {you}</p>

App.svelte:

<script>
  import Script from './Script.svelte';

  let y = { x: 1, y: 0};
</script>

<h1>Film</h1>

<Script title="Svelte: The Documentary" you="Rich Harris" />
  1. Open in VS Code w/ the Svelte Beta extension active

  2. Observe errors in App.svelte in "Problems" pane (View -> Problems)

Expected behavior
I would expect the language server to recognize <Script .../> as a component and not a script tag, especially since the code compiles.

Screenshots

With <Script ... />:
Screen Shot 2020-05-20 at 3 29 45 PM

With <MyScript ... />:
Screen Shot 2020-05-20 at 3 36 18 PM

System (please complete the following information):

@dummdidumm
Copy link
Member

Should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants