typescript-library-starter
typescript-library-starter copied to clipboard
Extract Jest, Prettier, commitlint, Husky... configuration from package.json
Make them independent .js files with @ts-check (or .ts files if easily possible):
- jest.config.js
- jest.setup.ts
- babel.config.js
- .browserslistrc
- prettier.config.js
- .prettierignore
- .huskyrc.js
- commitlint.config.js
- tslint.json
- .eslintrc.js
- ...
- This way you don't a fatty package.json that does multiple unrelated things
- You can add comments in .js files
- You can check the .js files with TypeScript and/or a linter
- One file does one thing, ala UNIX philosophy
Downside is that you have multiple root files, well that's how JavaScript development is nowadays.