1.1.3 • Published 7 years ago
@sr-net/typescript-config v1.1.3
TypeScript config files
Structure:
src: Contains all project files
dist: Build folder
typings: Where to put custom types (i.e. typings/global/index.d.ts)
baseUrl setup
The baseUrl is src so anything in it can be required easily. Example:
src
- routes
- get.ts
- foo
- bar
- biz.tsbiz.ts
-import { routes } from '../../../routes/get'
+import { routes } from 'routes/get'To use
Add the following option to tsconfig.json:
{
"extends": "./node_modules/@sr-net/typescript-config/tsconfig.json"
}For tslint, add the following option to tslint.json:
{
"extends": "./node_modules/@sr-net/typescript-config/tslint.json"
}Rules can be overwritten by adding them below the extends.