knip
knip copied to clipboard
✂️ Find unused files, dependencies and exports in your JavaScript and TypeScript projects. Knip it before you ship it!
Adds a plugin for [xo](https://github.com/xojs/xo#config). Essentially its an opinionated wrapper around eslint with a bunch of bundled rules and plugins, and the config object is just the eslint config object...
https://stackblitz.com/edit/github-yu5k5m?file=index.ts Here is a trimmed down helper we use all the time demostrating the failure case. We have a more complicated one that is type safe, but is curried e.g....
Hey 👋🏾 Thank you very much for this nice tool! It is great to see how it develops. A problem I stumble over is the ignoring of developer local files....
Aloha I'm aware of the following unused/dead code in my legacy project, but `knip` does not detect it. I know version 5 added some "namespace" support, but this does not...
I have a typescript file that export a function used only in the `` part of a .vue file like this: ``` import {humanFormat} from "@/services/HumanFormat"; {{ `Isosurface value (${humanFormat(value)})`...
Still draft until I can figure out why some tests are failing on github but not local. This PR is my attempt to fix #610. - Do not save module...
I've run npx knip --fix --allow-remove-files in a legacy next.js repo and I've got some undesired results: I can see some added /* eslint-disable */ and rare code around console.log...
It seems that there are potential problems with complex monorepos with each workspace using tsconfig paths or baseurl. If workspace A imports from workspaces B and both workspaces use tsconfig...
I'd like to write my own plugin for a package which pretty much only I use. Adding such a plugin to knip itself seems impractical to me and would make...
I found an interesting edge case that could be improved. ``` // orderFixtures folder export * from './fixture1' export * from './fixture2' ``` ``` // orderFixtures/fixture1.ts export const order1 =...