-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.json
31 lines (31 loc) · 1.35 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
{
/**
* This file is only used for development.
* It ensures all non-src directories use the same rules as the
* main tsconfig file by parsing all directories, not just src/,
* such that all TS/JS files still understand aliases, JSDoc, etc.
* from each other.
*
* For example, without this, a TS file in config/ that imports a JS
* file wouldn't necessarily pick up the JSDoc from JS, so the TS file
* wouldn't know how to call the function.
*
* That being said, this is generally only a problem for IDEs, not
* linters or other tools, because IDEs (usually) automatically parse
* only the closest tsconfig.json file, not any others with different
* names (e.g. tsconfig.tests.json).
* Thus, to avoid putting a tsconfig.json file with the same contents
* as this one in every single directory, just use this one root-level
* file for IDEs but then don't use it in any code/read only the one
* it extends in config files (e.g. webpack.config).
*/
"extends": "./tsconfig.main.json",
"include": [
/*
* Note: We can't use `/?(.)*` to include both b/c that would conflict with JS-only parsing
* rules for programs like ESLint.
*/
"./**/*", // All files - Includes config/, tests/, etc.
"./**/.*" // Dotfiles like .eslintrc.js
]
}