Flags packages that are attached but never used, so dropping the library/require call would leave the code running
just the same. A package counts as used as soon as any call resolves into it or anything reads one of its exports.
Needs a signature database to know what a package exports; without one the rule reports nothing. Packages the database
does not know, packages whose namespace loads with side effects, and those in the
whitelist are skipped. Every step errs towards keeping an import.
Readonlyinfo: { certainty:BestEffort; defaultConfig:{whitelist:readonly[]}; description:"Highlights packages that are attached but never used, so the code runs just the same without them. Requires a signature database, and packages that only do their work on load should be whitelisted in the configuration."; name:"Unused Import"; tags:readonly[Smell,Readability,QuickFix]; }
Flags packages that are attached but never used, so dropping the
library/requirecall would leave the code running just the same. A package counts as used as soon as any call resolves into it or anything reads one of its exports.Needs a signature database to know what a package exports; without one the rule reports nothing. Packages the database does not know, packages whose namespace loads with side effects, and those in the whitelist are skipped. Every step errs towards keeping an import.