-
-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Description
Hi, the rule @typescript-eslint/no-shadow
now triggers on snippets like this:
<ComponentWithSnippet>
{#snippet children()}
<AnotherComponentWithSnippet>
{#snippet children()}
Hello!
{/snippet}
</AnotherComponentWithSnippet>
{/snippet}
</ComponentWithSnippet>
This results on an error on the second children
function (children' is already declared in the upper scope on line ...
). However, this is probably (?) Mostly a false positive - you aren't actually shadowing a meaningful function or variable and you cannot really always control Snippet names (e.g. when they come from a 3rd party library) and you want to use the name children
if possible...
Could we change the rule/parsing/...? so that this rule never triggers on snippets? I can't come up with an example where you'd actually want the rule to trigger on snippets, but maybe there is some?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request