Skip to content

Doesn't recognize $$props #148

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

Closed
tv42 opened this issue Nov 30, 2021 · 3 comments · Fixed by #159
Closed

Doesn't recognize $$props #148

tv42 opened this issue Nov 30, 2021 · 3 comments · Fixed by #159

Comments

@tv42
Copy link

tv42 commented Nov 30, 2021

It seems the plugin doesn't understand that $$props is a globally defined variable in Svelte templates.

.../src/lib/custom_icons/IconBase.svelte
  2:10  error  '$$props' is not defined  no-undef

The entirety of that svelte file was

<img {...$$props} alt="icon" />

<style lang="scss">
        img {
                width: 100%;
                height: auto;
                max-height: 100%;
        }
</style>

Due to #134, there's no way to disable that error either.

@Conduitry
Copy link
Member

I can't reproduce this. I'll need a more complete reproduction. The way this is implemented is that the Svelte compiler tells this ESLint plugin which implicit magic globals exist in the component and that ESLint should not warn about, and this appears to be working for me.

@tv42
Copy link
Author

tv42 commented Dec 2, 2021

I'll need a more complete reproduction.

Yeah, understandable. I need to extract it from a larger program.

@wallw-teal
Copy link

I am also getting this for both $$props and $$restProps. Reproduction here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants