-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtsconfig.json
39 lines (32 loc) · 1.77 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
{
"compilerOptions": {
// Just take highest
// es2016 is a no because it doesn't support name capturing groups in regex.
// Doc: https://www.typescriptlang.org/docs/handbook/modules/theory.html#the-module-output-format
"target": "ES2022",
// > node16 and nodenext are the only correct module options for all apps and libraries that are intended to run in Node.js v12 or later
// https://www.typescriptlang.org/docs/handbook/modules/reference.html#the-module-compiler-option
// Current nodenext is node16
// Edit: Node16 is incompatible with moduleResolution bundler, preserve should be ok since we support ES modules.
"module": "preserve",
// Allow default import like `import lodash from 'lodash';` instead of `import * as lodash from 'lodash';`
"esModuleInterop": true,
// Stricter code
"forceConsistentCasingInFileNames": true,
"strict": true,
// Faster compile time
"skipLibCheck": true,
// Build dir
"outDir": "dist",
// todo
// may be usefull for build, however, this conflict with me using some stuff in scripts directory.
// I may have to refactor so that src does not rely on scripts...
// You could add the `rootDir` option to make the relationship between your source (`src`, etc.) and output (`dist`) directories explicit:
// - This tells TypeScript to treat `src` (or whatever your primary directory is) as the root of your project and will ensure consistent directory structure when files are built into `outDir`.
// "rootDir": "src",
// Allow us to import modules without having to suffix with `.js` due to ESM. (if your file is mts, you still have to do it -> `.mjs`)
"moduleResolution": "bundler"
},
"include": ["src", "scripts", "plugins"],
"exclude": ["**/*.test.ts"]
}