Comments (4)
Yeah, this should be documented better.
The problem here is that Knip does not know what is an npm package and what is an OS binary. While for echo
and exit
this may sound obvious, it's hard to draw a line here. Currently only these binaries are ignored: https://github.com/webpro/knip/blob/main/src/constants.ts#L20
Perhaps I should just add exit
and echo
to the list, since these packages are 9 and 12 years old, respectively.
For now you could add ignoreBinaries: ["echo", "exit"]
to the Knip config.
from knip.
I think it would be useful to add the most commonly used Linux, CMD and PowerShell commands as I think these are very commonly included in scripts across plattforms. And to point out on the README if they are OS commands.
Links:
https://kinsta.com/blog/linux-commands/
https://www.digitalcitizen.life/best-cmd-commands/
https://www.educba.com/powershell-commands/
It's not the end of the world, but it's important to have heard of it.
from knip.
Thanks for your input! I've added a few binaries to the ignore list (1.7.0) and a small section in the readme.
from knip.
I am going to close this, as it now covers these os commands.
Thank you for your blazingly fast response and keep up the good work!
from knip.
Related Issues (20)
- Workspaces no longer correctly identified since 5.10 HOT 6
- Issue a warning or fail if a specific file given as an entry point does not exist HOT 1
- Marked as unused if used only in Vue <template> HOT 11
- To read TypeScript configuration files Jest requires "ts-node" HOT 2
- Re-exported type reported as unused with `ignoreExportsUsedInFile` HOT 3
- Imports with foreign file extensions fail with "Unable to find" file error HOT 13
- --cache-location is an unknown option HOT 2
- Programatically Run HOT 1
- Re-exports with usage of barrel files isn't indexed correctly HOT 6
- Support for external plugins HOT 1
- Commitlint plugin: specifier.startsWith is not a function HOT 1
- commitlint plugin update breaks when `parserPreset` isn't a `string`
- SvelteKit Demo App $app/* unresolved HOT 2
- 5.14.0 breaks knip in git submodules
- Documentation Site Version Selector leads to 404 HOT 2
- Support local custom plugin HOT 2
- Support import.meta.resolve (in Pino v7+ transports) HOT 3
- Unused functions are not being detected HOT 5
- Default import name being used to determine if export is used HOT 7
- Re-exported enum members incorrectly reported as unused HOT 7
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.