Skip to content

chore: lint against Vite and build pipeline imports in bundled code - #16960

Merged
Rich-Harris merged 1 commit into
version-3from
lint-no-vite-in-shipped-code
Aug 27, 2026
Merged

Rich-Harris merged 1 commit into
version-3from
lint-no-vite-in-shipped-code

Conversation

@Nic-Polumeyv

Copy link
Copy Markdown
Member

src/runtime, src/exports (minus exports/vite) and src/utils are bundled into user apps, but nothing stops them importing vite, src/core or src/exports/vite. #15953 was exactly that: exports/internal/env.js importing stackless from exports/vite/utils.js.

This scopes a no-restricted-imports block to those directories. Core rule, so it runs unchanged under oxlint (#16703).

Fixes #15963

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 20f84f1:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/20f84f18b7fc76ade3eef29ec1b0b29e9f027f76

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16960

@changeset-bot

changeset-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 20f84f1

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@svelte-docs-bot

Copy link
Copy Markdown

@Rich-Harris
Rich-Harris merged commit 922271d into version-3 Aug 27, 2026
40 checks passed
@Rich-Harris
Rich-Harris deleted the lint-no-vite-in-shipped-code branch August 27, 2026 19:55
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 this pull request may close these issues.

Create ESLint rule preventing accidental Vite imports

2 participants