Skip to content

chore: knip informed clean up - #1208

Open
sacrosanctic wants to merge 7 commits into
sveltejs:mainfrom
sacrosanctic:knip
Open

chore: knip informed clean up#1208
sacrosanctic wants to merge 7 commits into
sveltejs:mainfrom
sacrosanctic:knip

Conversation

@sacrosanctic

Copy link
Copy Markdown
Contributor

Closes #

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...)

@pkg-svelte-dev

pkg-svelte-dev Bot commented Aug 1, 2026

Copy link
Copy Markdown

Install the latest version of sv from 80e7ca7:

pnpm add https://pkg.svelte.dev/sv/c/80e7ca7fd30644512b31baba1cf3336d06023fb1

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

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 Aug 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 80e7ca7

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

@sacrosanctic
sacrosanctic marked this pull request as ready for review August 1, 2026 05:16

@jycouet jycouet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like knip a lot, but I'm not sure it's very helpful at the moment here.
Some other views?


BTW, would be good to link issue and/or description to give a little more context.

Comment thread knip.jsonc Outdated
Comment on lines +1 to +28
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"tags": ["-lintignore"],
"workspaces": {
".": {
"entry": ["scripts/*.js"]
},
"packages/sv-utils": {
"entry": ["src/index.ts", "src/tests/*.ts"],
"ignore": ["src/tests/**"]
},
"packages/sv": {
"entry": [
"bin.ts",
"src/index.ts",
"src/testing.ts",
"src/cli/*.ts",
"src/create/scripts/*.js"
],
"ignore": ["src/**/tests/**", "src/create/templates/**", "src/create/shared/**"]
},
"packages/migrate": {
"entry": ["migrations/**/index.js"]
}
},
"ignoreExportsUsedInFile": { "type": true },
"ignoreBinaries": ["wait"]
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to see that it catched only 1 or 2 nitpicks!
It's also because a lot of stuff are ignored, maybe there are more stuff to knip await ^^

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • tests are ignored, but could be refined to just ignore the test output
  • /templates and /shared shouldnt be parsed, they're not actually a part of the project with regards to imports and exports
  • the last 2 are knip bugs, or they require a lot of refactoring to fix

@sacrosanctic

Copy link
Copy Markdown
Contributor Author

I like knip a lot, but I'm not sure it's very helpful at the moment here.
Some other views?

We don't have to add it, we can just keep the changes it found.

BTW, would be good to link issue and/or description to give a little more context.

No issue, doing it showcases whether its worth it or not. Also feels pretty self explanatory along the lines of prettier and eslint.

@sacrosanctic sacrosanctic changed the title chore: add knip chore: knip informed clean up Aug 2, 2026
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.

2 participants