Skip to content

linter: oxlint LSP creates a stray .svelte-kit folder at the monorepo root #22949

Description

@OrientusPrime

What version of Oxlint are you using?

1.67.0 (the build bundled with Vite+ / vite-plus)

What command did you run?

None directly — via the oxc VS Code extension, which starts the oxlint language server (oxlint --lsp).

What does your .oxlintrc.json (or oxlint.config.ts) config file look like?

No .oxlintrc.json / oxlint.config.ts. The lint config is the lint field of the top-level vite.config.ts, loaded through Vite+.

What happened?

In a monorepo where a SvelteKit app has its own vite.config.ts, the oxlint language server creates a .svelte-kit folder at the workspace root when the editor window loads or reloads (not on every reload — see the note in the steps below). That folder belongs inside the app's own directory (e.g. apps/web/.svelte-kit), not at the repository root.

Steps to reproduce:

  1. A monorepo with a SvelteKit app whose vite.config.ts uses the @sveltejs/kit/vite plugin, alongside a top-level vite.config.ts carrying the Vite+ lint config.
  2. Install the oxc VS Code extension (which starts the oxlint LSP).
  3. Delete any existing .svelte-kit at the repository root.
  4. Reload the VS Code window. It does not happen on every reload; sometimes it takes more than one.
  5. A .svelte-kit folder appears at the repository root.

Call stack captured at the moment the folder is created (instrumented SvelteKit's sync.init):

argv:   node .../node_modules/vite-plus/bin/oxlint --lsp
cwd:    /path/to/monorepo            (workspace root)
outDir: /path/to/monorepo/.svelte-kit

at handler (@sveltejs/kit/src/exports/vite/index.js)   # SvelteKit "config" hook -> svelte-kit sync
at runConfigHook (@voidzero-dev/vite-plus-core)
at resolveConfig (@voidzero-dev/vite-plus-core)
at loadViteConfigField (oxlint/dist/js_config.js)      # reads the `lint` field
at loadConfigs (oxlint/dist/js_config.js)

Versions

  • oxc VS Code extension 1.57.0 / oxlint 1.67.0 (vite-plus build)
  • vite-plus 0.1.23
  • @sveltejs/kit 2.61.1
  • macOS, VS Code

Disclosure: this report was prepared with AI assistance and reviewed before submission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions