A boilerplate/template for TypeScript projects in Node with sensible linting and formatting defaults.
- Forces strict mode and other code saftey rules for TypeScript.
- Configured for Node ES Modules (ESM).
- Uses ts-node for development.
- TypeScript ESLint with the following plugins/configs:
- Prettier with the following plugins/options:
- sort-imports
- sh
- pkg
- Options:
printWidth: 120
semi: false
trailingComma: all
- VSCode settings:
"*.preferences.importModuleSpecifierEnding": "js"
- Makes sure imports have the proper ending for ESM."editor.defaultFormatter": "esbenp.prettier-vscode"
- Sets Prettier as the default formatter.- You must have the VSCode Prettier plugin installed.
"editor.formatOnSave": true
- Format with Prettier on save.- It's also recommended that you install the VSCode ESLint plugin.
Any suggestions/improvements are more than welcome. Please submit an Issue or PR.