-
-
Notifications
You must be signed in to change notification settings - Fork 55
fix(no-top-level-browser-globals): false positives for compound logical expression guards #1305
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
Conversation
🦋 Changeset detectedLatest commit: 1ecb1ff The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Try the Instant Preview in Online PlaygroundInstall the Instant Preview to Your Local
Published Instant Preview Packages:
|
7dfabba
to
7459735
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not related original issue, but below case should be ok, but I got a report.
<script>
import { browser, dev } from '$app/environment';
</script>
{#if browser || (dev && browser)}
<div>{localStorage.getItem('myCat')}</div>
{/if}
packages/eslint-plugin-svelte/src/rules/no-top-level-browser-globals.ts
Outdated
Show resolved
Hide resolved
…lobals.ts Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>
Hmm. That would require checking all the condition paths, which is quite difficult, so I think we need to tackle it as a separate problem. What do you think? |
fixes #1298