ts-unused-exports: False positives on the unused export list
I got so many unused exports report that are actually used.
Mostly are default exports on Components and Containers, seems they are all detected as unused.
Some of them are detected as unused if it is imported using alias like import {a as b} from "abc".
Some are just plainly wrong detection, when I checked the function is used in several places across the codebase.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 9
- Comments: 21
Commits related to this issue
- test: Add test using absolute paths without paths set. * * note this does not repro #102 — committed to pzavolinsky/ts-unused-exports by mrseanryan 4 years ago
- test: Add tests for absolute paths and for aliases * * add tests using absolute paths without paths set. * - note this does not repro #102 - Add alias tests to export array and for import. — committed to pzavolinsky/ts-unused-exports by mrseanryan 4 years ago
- test: Add tests for absolute paths and for aliases * * add tests using absolute paths without paths set. * - note this does not repro #102 - Add alias tests to export array and for import. — committed to pzavolinsky/ts-unused-exports by mrseanryan 4 years ago
Yeah, I have exactly the same issue when:
export default SomeFunctioninindex.tsxOtherFunction.tsxI writeimport SomeFunction from ./folderSomeFunctionThe
export defaultinindex.tsxis indicated as unused.ver: “ts-unused-exports”: “^7.0.3”
I think the absolute import comes from the
compilerOptionshttps://justinnoel.dev/2019/06/18/configuring-react-absolute-imports-for-typescript/