-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtsconfig.json
More file actions
44 lines (44 loc) · 1.8 KB
/
tsconfig.json
File metadata and controls
44 lines (44 loc) · 1.8 KB
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
{
"compilerOptions": {
// Only emist .d.ts declaration files, tsup will handle the rest.
"declaration": true,
"emitDeclarationOnly": true,
// Generate source maps for .d.ts files (enables "go to source" for consumers)
"declarationMap": true,
// Generate .js.map source maps for debugging
"sourceMap": true,
// Keep const enum declarations in output (safer with isolatedModules)
"preserveConstEnums": true,
// Enable all strict type-checking options
"strict": true,
// Enable ergonomic default imports from CommonJS modules
"esModuleInterop": true,
// This is only for type checking, tsup will handle the emitted code.
"module": "commonjs",
"moduleResolution": "node",
// Compile to ES2022 (supports top-level await, Array.at(), etc.)
"target": "ES2022",
// Include ES2022 standard library types
"lib": ["ES2022"],
// Preserve comments in compiled output
"removeComments": false,
// Allow JS files so TypeScript can infer types from .js config files (e.g. lexer_config.js)
"allowJs": true,
// Skip type-checking of all .d.ts files for faster compilation
"skipLibCheck": true,
// Skip type-checking of default library .d.ts files
"skipDefaultLibCheck": true,
// Colorized, readable compiler error output
"pretty": true,
// Prevent issues on case-insensitive file systems (macOS/Windows)
"forceConsistentCasingInFileNames": true,
// Ensure each file can be independently transpiled (required by ts-jest and bundlers)
"isolatedModules": true,
// Enable JSX support for React (used by Storybook stories)
"jsx": "react-jsx",
// Output compiled files to the lib/ directory
"outDir": "./lib"
},
"include": ["src"],
"exclude": ["node_modules", "lib", "README.md", "**/*.test.ts", "src/stories"]
}