Comments (4)
Both are fine, the latter is recommended.
The docs don't contradict anything here?
from knip.
When using ignore
, based on the statement:
This is not a good idea, since ignore patterns have only one goal: to exclude issues in matching files from the report. Files matching ignore patterns are not excluded from the analysis, only their issues are not reported.
If I just ran knip
command:
exclude issues in matching files from the report
I would expect it to report e.g. an unused export inside of mockServiceWorker.js
.
Files matching ignore patterns are not excluded from the analysis, only their issues are not reported.
In the list of unused files, I would expect mockServiceWorker.js
to still be shown.
from knip.
Okay I think I get it now, it also states:
This also hurts performance, since the files are first analyzed, and eventually filtered out.
I interpreted the part "only their issues are not reported" as issues inside the file, but I guess it means the whole file being unused is also an issue of the file, and therefore filtered out (but only after the analysis ran on the file).
from knip.
Indeed! Any issue with files that match the ignore pattern is not reported.
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
- Running in production mode doesn't allow for easy tagging of internal-only files (as opposed to internal exports) HOT 4
- 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 5
- 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 extending a tsconfig file from a package HOT 4
- (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.