Skip to content

Conversation

@florian-lefebvre
Copy link
Member

@florian-lefebvre florian-lefebvre commented Apr 9, 2025

Changes

  • Setup https://knip.dev/ to catch and clean usused code
  • Updates the lint:ci workflow so it's enforced in CI
  • Enables tsconfig noUnusedLocals and noUnusedParameters
  • Updates biome and eslint to prevent unused variables
  • Update codebase based on the reports of the tools above. No public API should be affected because knip is smart enough to detect files that are exported. Big thanks to @webpro for the help!

Testing

Should still pass

Docs

Changeset is technically not required but I prefer to play it safe

@florian-lefebvre florian-lefebvre self-assigned this Apr 9, 2025
@changeset-bot
Copy link

changeset-bot bot commented Apr 9, 2025

🦋 Changeset detected

Latest commit: 70aa2e2

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

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

@github-actions github-actions bot added pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope) pkg: react Related to React (scope) labels Apr 9, 2025
@github-actions github-actions bot added the 🚨 action Modifies GitHub Actions label Apr 21, 2025
@github-actions github-actions bot removed pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope) pkg: react Related to React (scope) labels Apr 22, 2025
@florian-lefebvre florian-lefebvre changed the title feat: knip chore: clean dead code Apr 22, 2025
@florian-lefebvre florian-lefebvre marked this pull request as ready for review April 22, 2025 12:19
@ematipico
Copy link
Member

CI is failing 🤔

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Left some questions

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Let's merge it quickly before it becomes outdated. Great work @florian-lefebvre

@florian-lefebvre florian-lefebvre merged commit 5dd2d3f into main Apr 22, 2025
17 checks passed
@florian-lefebvre florian-lefebvre deleted the feat/knip branch April 22, 2025 16:10
@astrobot-houston astrobot-houston mentioned this pull request Apr 22, 2025
openscript pushed a commit to openscript/astro that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚨 action Modifies GitHub Actions pkg: astro Related to the core `astro` package (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: preact Related to Preact (scope) pkg: solid Related to Solid (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants