eslint-plugin-svelte
eslint-plugin-svelte copied to clipboard
Rule 'no-use-before-define' from eslint
Description
Hello, thanks for the great tool
Eslint have rule 'no-use-before-define', it is useful in many situations, but have problem with Svelte:
+layout.svelte
<Header />
<script>
import Header from '$lib/components/header/Header.svelte';
</script>
Will result: error 'Header' was used before it was defined no-use-before-define
. This is correct behavior to JS, but not to Svelte.
Is there any way to improve compatibility?
Also ran into this.
When contributing this rule, should it support coarse options extending the existing options like props
and components
or just allow any reference outside the