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

Using <script global> or :global selector doesn't silence eslint warnings #123

Open
dtzxporter opened this issue Jul 23, 2021 · 2 comments · May be fixed by #173
Open

Using <script global> or :global selector doesn't silence eslint warnings #123

dtzxporter opened this issue Jul 23, 2021 · 2 comments · May be fixed by #173
Labels
enhancement New feature or request

Comments

@dtzxporter
Copy link

Eslint will still complain about an 'unused' selector when svelte's linter knows that it's marked global.

<script global>
body { color: red; }
</script>
@jcayzac
Copy link

jcayzac commented Jul 31, 2021

@dtzxporter what is your eslint confguration?

@Conduitry Conduitry added the enhancement New feature or request label Oct 3, 2021
@Conduitry
Copy link
Member

I assume this is meant to say <style global>? This isn't an official Svelte syntax, and is something added by svelte-preprocess. But, since that's an official library, I think it might make sense to automatically suppress warnings about the CSS in that case. :global() should already be working, because we're relying on the Svelte compiler itself for these warnings.

metonym added a commit to metonym/eslint-plugin-svelte3 that referenced this issue Mar 26, 2022
metonym added a commit to metonym/eslint-plugin-svelte3 that referenced this issue Mar 28, 2022
metonym added a commit to metonym/eslint-plugin-svelte3 that referenced this issue Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants