-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
68 lines (53 loc) · 2.34 KB
/
tsconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
"compilerOptions": {
// Enables strict type-checking options
"strict": true,
// Specifies the ECMAScript target version
"target": "es2020",
// Specifies the module code generation
"module": "es2020",
// dist should be treated as destroyable minus it's .gitignore directory
"outDir": "./dist",
// Modules resolution:
// - "node" = Mimics Node.js' module resolution mechanism. Looks inside
// `node_modules` and works with both `.js` and `.json` files. Compatible
// with CJS and ES6 module syntax.
// - "bundler" = Supports package.json "imports" and "exports", but unlike
// the Node.js resolution modes, bundler never requires file extensions on
// relative paths in imports.
// - "classic" = TypeScript's original resolution strategy. Doesn't consider
// `node_modules` or understand JSON files and is less commonly used today.
// - https://github.com/babel/babel/issues/10237#issuecomment-513028440
// - https://www.typescriptlang.org/tsconfig#moduleResolution
"moduleResolution": "node",
// Support non "* as" imports; ex:
// `import React from 'react'` instead of `import * as React from 'react'`
"allowSyntheticDefaultImports": true,
// Changes the emitted JavaScript to add an extra layer of compatibility for
// default imports
"esModuleInterop": true,
// Allows JavaScript files to be imported
// - Needed with ^.+\\.[tj]sx?$ Jest transform so .js `node_modules` are capable of
// being imported
// - Disabled by default due to not needing to be enabled by default - usually needed
// importing/testing things in `node_modules` due to own project being TypeScript
// "allowJs": true,
// Path aliases
// - Used to avoid excessive relative pathing and/or weird absolute pathing hacks
"paths" : {
"@src/*" : [ "./src/*" ]
},
},
"include": [
// Transpile files ending in .ts
"**/*.ts",
],
"exclude": [
// Ignore files ending in .test.ts (Jest tests)
"**/*.test.ts",
// Ignore integration tests directory
"./tests",
// Ignore Swagger docs directory
"./swagger",
]
}