Skip to content

fix(eslint): use recommendedTypeChecked - #1202

Open
sacrosanctic wants to merge 23 commits into
sveltejs:version-1from
sacrosanctic:hidden-landfowl
Open

fix(eslint): use recommendedTypeChecked#1202
sacrosanctic wants to merge 23 commits into
sveltejs:version-1from
sacrosanctic:hidden-landfowl

Conversation

@sacrosanctic

@sacrosanctic sacrosanctic commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Closes #938

Description

Checklist

  • Update snapshots (if applicable)
  • Add a changeset (if applicable)
  • Allow maintainers to edit this PR
  • I care about what I'm doing, no matter the tool I use (Notepad, Sublime, VSCode, AI...)

sacrosanctic and others added 10 commits July 23, 2026 15:46
* main

* throw if pm isnt installed

* throw

* nit

* changeset

* tmv sv ordering

* sh is unknwon on windows (execSync know about it)

* hint to label & next step

* caching agent install, keep none by default

---------

Co-authored-by: jycouet <jycouet@gmail.com>
Bump package-manager-detector to ^1.8.0, the first release with nub in its
agent and command tables. sv-utils bundles the library at build time, so the
published bundle only knows about nub once rebuilt against >=1.8.0.
…eltejs#1192)

When prettier is among the scaffolded add-ons, format the whole project rather
than only the add-on-touched files, so a fresh project passes its own lint.
Prettier's ignore rules still apply.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
* feat: addOption in setup phase

* fmt²

* okay cut

* humm

* fmt

* chore: update api surface

* test: await async setupAddons in engine tests

* Update packages/sv/src/core/config.ts

Co-authored-by: Scott Wu <sw@scottwu.ca>

* Update packages/sv/src/core/config.ts

Co-authored-by: Scott Wu <sw@scottwu.ca>

* feat: typesafe addOption keys via defineAddon setup generic

- addOption now constrains key + question type from defineAddon<SetupValues>()
- regenerate api surface

---------

Co-authored-by: Scott Wu <sw@scottwu.ca>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* mv

* feat: welcome `ai-tools`

* abc

* don't format skills

* opencode -> plugin, claude question, subagents

* fmt

* cleanup snap

* snap

* update new path

* feat(ai-tools): choose Svelte plugin or individual tools per client

- delivery option: Svelte plugin (Claude via committed .claude/settings.json, opencode via opencode.json) or individual tools
- granular MCP/skills/sub-agents selection; rename `setup` -> `mcpSetup`
- consolidate per-client config into a single `CLIENTS` registry

* feat(ai-tools): install skills for cursor, gemini and vscode

* feat(ai-tools): CLAUDE.md imports AGENTS.md to keep a single source of truth

* chore(ai-tools): rename RX_MD to REGEX_MD

* feat(ai-tools): warn in next steps when plugin and loose skill/agent files coexist

* fmt

* fix(ai-tools): 'other' client now writes AGENTS.md

* fix(ai-tools): only ask tool/MCP questions when a client can use them

* Update packages/sv/src/create/shared/+skills/svelte-code-writer/SKILL.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update documentation/docs/30-add-ons/01-ai-tools.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update documentation/docs/30-add-ons/01-ai-tools.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update documentation/docs/30-add-ons/01-ai-tools.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update documentation/docs/30-add-ons/01-ai-tools.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/addons/ai-tools.ts

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/addons/ai-tools.ts

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+skills/svelte-code-writer/SKILL.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+skills/svelte-code-writer/SKILL.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+skills/svelte-code-writer/SKILL.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+skills/svelte-code-writer/SKILL.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/addons/ai-tools.ts

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/addons/ai-tools.ts

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+agents/svelte-file-editor.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+agents/svelte-file-editor.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+agents/svelte-file-editor.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+agents/svelte-file-editor.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+agents/svelte-file-editor.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+agents/svelte-file-editor.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+agents/svelte-file-editor.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* Update packages/sv/src/create/shared/+agents/svelte-file-editor.md

Co-authored-by: Rich Harris <hello@rich-harris.dev>

* update skills

* fix: drop stale reference files and update ai-tools snapshots

---------

Co-authored-by: Rich Harris <hello@rich-harris.dev>
…rrors (sveltejs#1198)

* fix: drop obsolete pnpm allowBuilds entries and surface real format errors

* test: install generated project outside the repo workspace
…t 3 shape (sveltejs#1199)

* feat(sv-utils): add SvelteKit 3 helpers

Version detection, the `$lib` -> `#lib` move and the generated `$app/tsconfig`, so add-ons stop hardcoding kit-version-specific shapes.

* fix(core): make `runsAfter` actually order add-ons

It sorted by number of constraints, so an add-on could still run before one it declared it runs after. Topologically sort instead, seeded with the previous order so unconstrained add-ons keep their relative position.

* fix(experimental): create manages `#lib` and the rest of the SvelteKit 3 shape

- skip `handleRenderingErrors`/`explicitEnvironmentVariables`, removed in kit 3
- extend `$app/tsconfig` and own `include`, keeping deliberate compiler option overrides
- rewrite `$lib` to `#lib` and declare the subpath imports Vite resolves from
- drizzle drops the removed `typescript.config` hook; `defineEnvVars` moves to `@sveltejs/kit/env`
- better-auth and paraglide emit the right lib prefix and route type

* test(cli): cover `kit@next` with a real install, build and check

No snapshot: the point is that the project works, not what it looks like.

* Update packages/sv/src/addons/drizzle.ts

Co-authored-by: Scott Wu <sw@scottwu.ca>

* Update packages/sv-utils/src/kit3.ts

Co-authored-by: Scott Wu <sw@scottwu.ca>

* test(cli): cover better-auth on `kit@next`, finish the `KIT3_TSCONFIG_DEFAULT` rename

better-auth has the most `#lib` imports, so it gets its own `kit@next` install/build/check case. It
can't join the existing one: kit treats any `remote.js` as a remote module, including the one `jose`
ships, so `remoteFunctions` breaks the build.

Also rewords the changeset and updates the two remaining `KIT3_TSCONFIG_INHERITED` references.

* test(cli): pin the `kit@next` prereleases the experimental cases run against

* test(cli): drop the better-auth `kit@next` case

* chore: fix indentation

* test(cli): let the generated project install a fresh prerelease

* test(cli): track the `next` tag instead of a pinned prerelease

* chore: trim the changesets to one line each

* chore: changeset wording

---------

Co-authored-by: Scott Wu <sw@scottwu.ca>
@pkg-svelte-dev

pkg-svelte-dev Bot commented Jul 30, 2026

Copy link
Copy Markdown

Install the latest version of sv from 380ef58:

pnpm add https://pkg.svelte.dev/sv/c/380ef58afb8c651c37531eccd51ecc5a76abe3a3

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/cli/pr/1202

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 380ef58

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
sv Minor
@sveltejs/sv-utils Patch

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

@sacrosanctic
sacrosanctic marked this pull request as draft July 30, 2026 17:18
@sacrosanctic
sacrosanctic marked this pull request as ready for review July 31, 2026 02:53
Comment thread packages/sv/src/addons/better-auth.ts Outdated
@sacrosanctic

Copy link
Copy Markdown
Contributor Author
 ❯  addons  tests/eslint/test.ts (4 tests | 1 failed) 185289ms
   ✓ eslint 'kit-js'  113307ms
   ✓ eslint 'kit-ts'  113306ms
   ✓ eslint 'vite-js'  113306ms
   × eslint 'vite-ts' 173888ms (retry x3)

I don't understand how this project is structured. It has 2 tsconfig.json's.

@AdrianGonz97

Copy link
Copy Markdown
Member

While looking into the lint failure for #1202 (comment), I started to go through the new lint rules (this list only contains what's added by recommendedTypeChecked to recommended).

I'm left wondering if the preset rules for recommendedTypeChecked may be too opinionated, or perhaps contain some questionable defaults?

For example, I can already foresee no-floating-promises becoming a problem when it comes to deferred query refreshes with remote functions.

something like this:

const foo = form(() => {
	// ...stuff happens
	
	query1().refresh() // lint error!
	query2().refresh() // lint error!
})

could erroneously lead people down the very wrong path of awaiting these refreshes:

const foo = form(() => {
	// ...stuff happens

	// oops! these no longer run concurrently!
	await query1().refresh()
	await query2().refresh()
})

however, while adding void query1().refresh() may dismiss the lint error, that 'fix' will not be everyone's first instinct.

only-throw-error could be an issue with thrown a redirect, though i haven't tested it so i can't be certain at the moment.

I also vaguely remember require-await being the source of some annoying issues when we first tried to enable it for this repo, but I'm not able to recall exactly why. Do you guys (@manuel3108, @benmccann) happen to remember?

@sacrosanctic

Copy link
Copy Markdown
Contributor Author

Good stuff, definitely things to consider, hopefully this PR can create the discussion needed to merge this or to close the original issue. Will have to do more exploration with the new APIs.

however, while adding void query1().refresh() may dismiss the lint error, that 'fix' will not be everyone's first instinct.

It is part of the lint error, maybe we can overwrite it with our own custom error msg?

only-throw-error could be an issue with thrown a redirect

Don't think this is an issue, we don't throw error or redirect.

@manuel3108

Copy link
Copy Markdown
Member

I also vaguely remember require-await being the source of some annoying issues when we first tried to enable it for this repo, but I'm not able to recall exactly why. Do you guys (@manuel3108, @benmccann) happen to remember?

Sadly i don't remember any of this. But I see your points.

Do I see that correctly, that this PR tries to change the setup for new projects (sv create) and our own codebase? I mean it totally makes sense, just trying to understand the scope of this PR

@manuel3108
manuel3108 changed the base branch from main to version-1 August 7, 2026 07:42
@manuel3108

Copy link
Copy Markdown
Member

Changed target branch and resolved produced merge conflicts

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.

Consider using recommendedTypeChecked with typescript-eslint

6 participants