alexjoverm / typescript-library-starter

Starter kit with zero-config for building a library in TypeScript, featuring RollupJS, Jest, Prettier, TSLint, Semantic Release, and more!
MIT License
4.37k stars 493 forks source link

tsconfig doesn't include tests #245

Open slikts opened 6 years ago

slikts commented 6 years ago

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.

janat08 commented 5 years ago

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

slikts commented 5 years ago

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.

janat08 commented 5 years ago

Hopefully you can reccomend something else?