You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my project structure, /src folder and /test folder are both seperate.
/project/src/...
/project/test/...
I export some of the code from /src to test it, and some of the exports only exist for the tests, but they are considered as unused exports by the ts-unused-exports. Seems like only the /src directory is being checked for code inside /src. I can add ignores, but that doesn't seem like a great solution for long term.
Is there any way how i can fix this, maybe different paths in tsconfig.json or something.
My current tsconfig.json include: "include": ["src/**/*", "test/**/*", "types/**/*"]
Also tried using --ignoreLocallyUsed, hoping that the exported functions for tests would disappear from the error, considering that they are being called in the same file, but it didn't work.
"ts-unused-exports": "9.0.5",
The text was updated successfully, but these errors were encountered:
Possibly a bug - given test/**/* is in the "include".
Although not sure about this:
hoping that the exported functions for tests would disappear from the error, considering that they are being called in the same file, but it didn't work
If a function is used in the same file, it can still be an "unused export" if nothing outside that file is importing it.
In my project structure, /src folder and /test folder are both seperate.
/project/src/...
/project/test/...
I export some of the code from /src to test it, and some of the exports only exist for the tests, but they are considered as unused exports by the ts-unused-exports. Seems like only the /src directory is being checked for code inside /src. I can add ignores, but that doesn't seem like a great solution for long term.
Is there any way how i can fix this, maybe different paths in tsconfig.json or something.
My current tsconfig.json include:
"include": ["src/**/*", "test/**/*", "types/**/*"]
Also tried using --ignoreLocallyUsed, hoping that the exported functions for tests would disappear from the error, considering that they are being called in the same file, but it didn't work.
"ts-unused-exports": "9.0.5",
The text was updated successfully, but these errors were encountered: