typescript-library-starter icon indicating copy to clipboard operation
typescript-library-starter copied to clipboard

tsconfig doesn't include tests

Open slikts opened this issue 7 years ago • 3 comments

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.

slikts avatar Sep 30 '18 12:09 slikts

would be nice if separate tsconfig existed, since you may not want to be as strict in tests.

janat08 avatar Mar 30 '19 03:03 janat08

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.

slikts avatar Mar 30 '19 07:03 slikts

Hopefully you can reccomend something else?

janat08 avatar Mar 31 '19 05:03 janat08