orbitkit icon indicating copy to clipboard operation
orbitkit copied to clipboard

Add knip integration

Open ixahmedxi opened this issue 1 year ago • 1 comments

Knip is an awesome tool that let's you know about unused deps/exports in the codebase, unused exports shouldn't be a worry of ours when it comes to the ui package but otherwise it does apply.

ixahmedxi avatar Apr 06 '24 20:04 ixahmedxi

I had started looking at the implementation for this this afternoon, but I am currently facing some issues.

  • It fails to resolve the storybook configuration found in packages/config/storybook/src/configs/react-vite.ts that is a dependent of packages/ui/.storybook/main.ts as I can only assume knip expects all packages to be built before the command runs, which isn't ideal.
  • It fails to resolve the .css file located in the assets package, @orbitkit/assets/fonts/stylesheet.css for example, specifically when parsing apps/marketing/src/components/BaseHead.astro.
  • It finally fails to recognise the multiple eslint plugins that are used and marks them as unused, perhaps because of the monorepo nature!

I'm going to attempt to work through these following the suggestions in the documentation, but I'm hitting a couple of hurdles.

msmps avatar Apr 07 '24 16:04 msmps