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

Fix esbuild warning for local dev #9160

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Fix esbuild warning for local dev #9160

merged 1 commit into from
Nov 22, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Nov 22, 2023

Changes

Recently we upgraded esbuild, which (for some reason) does partial linting and flagged this code in packages/astro:

▲ [WARNING] The "??" operator here will always return the left operand [suspicious-nullish-coalescing]

    src/vite-plugin-scanner/scan.ts:75:43:
      75 │             settings?.config.output === 'hybrid' ?? false
         ╵                                                  ~~

  The left operand of the "??" operator here will never be null or undefined, so it will always be
  returned. This usually indicates a bug in your code:

    src/vite-plugin-scanner/scan.ts:75:6:
      75 │             settings?.config.output === 'hybrid' ?? false
         ╵             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[05:51 PM] ⚠ updated with warnings:
[object Object]
[05:51 PM] ✔ updated

I removed the ?? false in this PR.

Testing

Existing test should pass

Docs

n/a. internal refactor.

Copy link

changeset-bot bot commented Nov 22, 2023

⚠️ No Changeset found

Latest commit: f4618e6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Nov 22, 2023
@bluwy
Copy link
Member Author

bluwy commented Nov 22, 2023

Merging this in since it's a simple change 😬

@bluwy bluwy merged commit 560ff29 into next Nov 22, 2023
13 checks passed
@bluwy bluwy deleted the fix-esbuild-warning branch November 22, 2023 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant