Comments (4)
Oh no:
Devbox not found
It's likely that the Devbox you're trying to access doesn't exist or you don't have the required permissions to access it.
from knip.
Oh no:
Devbox not found
It's likely that the Devbox you're trying to access doesn't exist or you don't have the required permissions to access it.
my bad, changed sharing settings to public. First time dealing with a devbox via codesandbox π
from knip.
I think what you're after is to exclude test_util
from the production project file set:
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": ["index.ts!", "test.ts"],
"project": ["*.ts!", "!test_util.ts!"]
}
The general case with e.g. **/*.test.ts
is handled automatically for plugins (i.e. they're excluded in production mode). This "test util" case is a weak spot indeed, yet can be overcome by manually excluding them in production mode using double exclamation marks.
from knip.
I think what you're after is to exclude test_util from the production project file set:
we could do that, but I agree with the philosophy in #706 that ideally we wouldn't have a typical workflow that involves users changing arrays in config files.
That example ought to demonstrate what I see the issue being. For a file that's got internal and production exports i.e. other_util.ts
, it suffices to add /** @internal */
to the one internal export testOnlyUtil
. However, say someone comes along and refactors other_util.ts
and removes usedUtil
- it's awkward that it suddenly becomes a necessity to add this file to knip.json
.
from knip.
Related Issues (20)
- @public modifier does not work if the whole file is unused HOT 9
- New husky format does not work for binaries without 'npx' HOT 2
- Conditional required import not longer working HOT 10
- Packages re-exported under different name through typescript module declaration HOT 1
- vite-plugin-fast-react-svg integration HOT 2
- Knip doesn't resolve imports in Nuxt projects HOT 3
- circular dependencies making knip stuck HOT 6
- detect unused fields returned by setup function HOT 1
- Add support for electron and electron-vite HOT 1
- npm init @knip/config fails on SVN repository HOT 1
- @types/xxx dependencies reported as unused HOT 5
- Cannot run yarn create @knip/config in workspaces root HOT 1
- Add support for Vue composables unused properties detection HOT 1
- Plz know my βtsconfig.xyz.jsonβ HOT 2
- Umm... name may be offensive to Japanese people HOT 4
- π Issue links are broken HOT 4
- π False positive for `unlisted` when using package.json `exports` in tsconfig "types" field. HOT 2
- (PostCSS plugin): Add `postcss` to `referencedDependencies` when using Tailwind CSS with PostCSS HOT 2
- π‘ Add option to ignore export names using a pattern HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knip.