typescript-library-starter
typescript-library-starter copied to clipboard
tsconfig doesn't include tests
The problem with tsconfig.json not including tests is that if the library depends on the TS type libraries, then the tests can have type errors. The fix I've used is to change "includes" to ["src", "test"] in tsconfig.json and create a new tsconfig.prod.json that extends tsconfig.json but doesn't include "test", and also change the build command to run "tsc -p tsconfig.prod.json", but this should really be fixed by default.
would be nice if separate tsconfig existed, since you may not want to be as strict in tests.
This boilerplate is generally out of date, so I'd suggest avoiding it; for example, the current best practices are using @babel/preset-typescript instead of tsc to downlevel-compile, and using typescript-eslint instead of tslint.
Hopefully you can reccomend something else?