|
1 | 1 | { |
| 2 | + /** |
| 3 | + * Instructs the TypeScript compiler how to compile the .ts files. |
| 4 | + * @see https://www.typescriptlang.org/tsconfig#compilerOptions |
| 5 | + */ |
2 | 6 | "compilerOptions": { |
3 | | - "rootDir": "src", |
4 | | - "outDir": "./dist", |
5 | | - "typeRoots": ["node_modules/@types", "./config/types"], |
6 | | - "types": ["google-apps-script"], |
7 | | - "tsBuildInfoFile": "node_modules/.tmp/tsconfig.appsscript.tsbuildinfo", |
8 | | - "target": "ESNext", |
9 | | - "experimentalDecorators": true, |
| 7 | + /** |
| 8 | + * Allow importing files with a TypeScript-specific extension (.ts, .tsx, etc.). |
| 9 | + * @see https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions |
| 10 | + */ |
| 11 | + "allowImportingTsExtensions": false, |
| 12 | + |
| 13 | + /** |
| 14 | + * Disable error reporting for unreachable code. |
| 15 | + * @see https://www.typescriptlang.org/tsconfig#allowUnreachableCode |
| 16 | + */ |
| 17 | + "allowUnreachableCode": false, |
| 18 | + |
| 19 | + /** |
| 20 | + * Disable error reporting for unused labels. |
| 21 | + * @see https://www.typescriptlang.org/tsconfig#allowUnusedLabels |
| 22 | + */ |
| 23 | + "allowUnusedLabels": false, |
| 24 | + |
| 25 | + /** |
| 26 | + * Base directory to resolve non-relative module names. |
| 27 | + * @see https://www.typescriptlang.org/tsconfig#baseUrl |
| 28 | + */ |
| 29 | + "baseUrl": "src", |
| 30 | + |
| 31 | + /** |
| 32 | + * Enable project compilation. |
| 33 | + * @see https://www.typescriptlang.org/tsconfig#composite |
| 34 | + */ |
| 35 | + "composite": true, |
| 36 | + |
| 37 | + /** |
| 38 | + * Generate .d.ts files from TypeScript and JavaScript files in your project. |
| 39 | + * @see https://www.typescriptlang.org/tsconfig#declaration |
| 40 | + */ |
| 41 | + "declaration": true, |
| 42 | + |
| 43 | + /** |
| 44 | + * Create sourcemaps for d.ts files. |
| 45 | + * @see https://www.typescriptlang.org/tsconfig#declarationMap |
| 46 | + */ |
| 47 | + "declarationMap": true, |
| 48 | + |
| 49 | + /** |
| 50 | + * Emit design-type metadata for decorated declarations in source files. |
| 51 | + * @see https://www.typescriptlang.org/tsconfig#emitDecoratorMetadata |
| 52 | + */ |
10 | 53 | "emitDecoratorMetadata": true, |
11 | | - "useDefineForClassFields": false, |
12 | | - "lib": ["ESNext"], |
13 | | - "module": "ESNext", |
| 54 | + |
| 55 | + /** |
| 56 | + * Emit additional JavaScript to ease support for importing CommonJS modules. |
| 57 | + * @see https://www.typescriptlang.org/tsconfig#esModuleInterop |
| 58 | + */ |
14 | 59 | "esModuleInterop": true, |
15 | | - "skipLibCheck": true, |
| 60 | + |
| 61 | + /** |
| 62 | + * Enable experimental support for legacy experimental decorators. |
| 63 | + * @see https://www.typescriptlang.org/tsconfig#experimentalDecorators |
| 64 | + */ |
| 65 | + "experimentalDecorators": true, |
| 66 | + |
| 67 | + /** |
| 68 | + * Ensure that the casing is correct in imports. |
| 69 | + * @see https://www.typescriptlang.org/tsconfig#forceConsistentCasingInFileNames |
| 70 | + */ |
16 | 71 | "forceConsistentCasingInFileNames": true, |
17 | | - "moduleResolution": "node", |
18 | | - "allowImportingTsExtensions": false, |
| 72 | + |
| 73 | + /** |
| 74 | + * Ensure each file can be safely transpiled without relying on other imports. |
| 75 | + * @see https://www.typescriptlang.org/tsconfig#isolatedModules |
| 76 | + */ |
19 | 77 | "isolatedModules": false, |
| 78 | + |
| 79 | + /** |
| 80 | + * List of library files to be included in the compilation. |
| 81 | + * @see https://www.typescriptlang.org/tsconfig#lib |
| 82 | + */ |
| 83 | + "lib": ["ESNext"], |
| 84 | + |
| 85 | + /** |
| 86 | + * Specify what module code is generated. |
| 87 | + * @see https://www.typescriptlang.org/tsconfig#module |
| 88 | + */ |
| 89 | + "module": "ESNext", |
| 90 | + |
| 91 | + /** |
| 92 | + * Control what method is used to detect whether a file is a script or a module. |
| 93 | + * @see https://www.typescriptlang.org/tsconfig#moduleDetection |
| 94 | + */ |
20 | 95 | "moduleDetection": "force", |
| 96 | + |
| 97 | + /** |
| 98 | + * Specify how TypeScript looks up a file from a given module specifier. |
| 99 | + * @see https://www.typescriptlang.org/tsconfig#moduleResolution |
| 100 | + */ |
| 101 | + "moduleResolution": "bundler", |
| 102 | + |
| 103 | + /** |
| 104 | + * Disable emitting files from a compilation. |
| 105 | + * @see https://www.typescriptlang.org/tsconfig#noEmit |
| 106 | + */ |
21 | 107 | "noEmit": false, |
22 | | - "strict": true, |
23 | | - "noUnusedLocals": false, |
24 | | - "noUnusedParameters": false, |
| 108 | + |
| 109 | + /** |
| 110 | + * Enable error reporting for fallthrough cases in switch statements. |
| 111 | + * @see https://www.typescriptlang.org/tsconfig#noFallthroughCasesInSwitch |
| 112 | + */ |
25 | 113 | "noFallthroughCasesInSwitch": true, |
| 114 | + |
| 115 | + /** |
| 116 | + * Ensure that any non-relative imports are not only present but also have a valid type definition. |
| 117 | + * @see https://www.typescriptlang.org/tsconfig#noUncheckedSideEffectImports |
| 118 | + */ |
26 | 119 | "noUncheckedSideEffectImports": true, |
27 | | - "allowUnreachableCode": false, |
28 | | - "allowUnusedLabels": false, |
29 | | - "composite": false, |
30 | | - "sourceMap": true, |
31 | | - "declaration": true, |
32 | | - "declarationMap": true, |
33 | | - "baseUrl": "src", |
| 120 | + |
| 121 | + /** |
| 122 | + * Enable error reporting when local variables aren't read. |
| 123 | + * @see https://www.typescriptlang.org/tsconfig#noUnusedLocals |
| 124 | + */ |
| 125 | + "noUnusedLocals": false, |
| 126 | + |
| 127 | + /** |
| 128 | + * Raise an error when a function parameter isn't read. |
| 129 | + * @see https://www.typescriptlang.org/tsconfig#noUnusedParameters |
| 130 | + */ |
| 131 | + "noUnusedParameters": false, |
| 132 | + |
| 133 | + /** |
| 134 | + * Specify an output folder for all emitted files. |
| 135 | + * @see https://www.typescriptlang.org/tsconfig#outDir |
| 136 | + */ |
| 137 | + "outDir": "./dist", |
| 138 | + |
| 139 | + /** |
| 140 | + * A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. |
| 141 | + * @see https://www.typescriptlang.org/tsconfig#paths |
| 142 | + */ |
34 | 143 | "paths": { |
35 | 144 | "@/*": ["*"] |
36 | | - } |
| 145 | + }, |
| 146 | + |
| 147 | + /** |
| 148 | + * Specify the root folder within your source files. |
| 149 | + * @see https://www.typescriptlang.org/tsconfig#rootDir |
| 150 | + */ |
| 151 | + "rootDir": "src", |
| 152 | + |
| 153 | + /** |
| 154 | + * Skip type checking all .d.ts files. |
| 155 | + * @see https://www.typescriptlang.org/tsconfig#skipLibCheck |
| 156 | + */ |
| 157 | + "skipLibCheck": true, |
| 158 | + |
| 159 | + /** |
| 160 | + * Create source map files for emitted JavaScript files. |
| 161 | + * @see https://www.typescriptlang.org/tsconfig#sourceMap |
| 162 | + */ |
| 163 | + "sourceMap": true, |
| 164 | + |
| 165 | + /** |
| 166 | + * Enable all strict type-checking options. |
| 167 | + * @see https://www.typescriptlang.org/tsconfig#strict |
| 168 | + */ |
| 169 | + "strict": true, |
| 170 | + |
| 171 | + /** |
| 172 | + * Set the JavaScript language version for emitted JavaScript and include compatible library declarations. |
| 173 | + * @see https://www.typescriptlang.org/tsconfig#target |
| 174 | + */ |
| 175 | + "target": "ESNext", |
| 176 | + |
| 177 | + /** |
| 178 | + * Specify the file to store incremental compilation information. |
| 179 | + * @see https://www.typescriptlang.org/tsconfig#tsBuildInfoFile |
| 180 | + */ |
| 181 | + "tsBuildInfoFile": "node_modules/.tmp/tsconfig.appsscript.tsbuildinfo", |
| 182 | + |
| 183 | + /** |
| 184 | + * List of folders to include type definitions from. |
| 185 | + * @see https://www.typescriptlang.org/tsconfig#typeRoots |
| 186 | + */ |
| 187 | + "typeRoots": ["node_modules/@types", "./config/types"], |
| 188 | + |
| 189 | + /** |
| 190 | + * Specify type package names to be included without being referenced in a source file. |
| 191 | + * @see https://www.typescriptlang.org/tsconfig#types |
| 192 | + */ |
| 193 | + "types": ["google-apps-script"], |
| 194 | + |
| 195 | + /** |
| 196 | + * Emit ECMAScript-standard-compliant class fields. |
| 197 | + * @see https://www.typescriptlang.org/tsconfig#useDefineForClassFields |
| 198 | + */ |
| 199 | + "useDefineForClassFields": false |
37 | 200 | }, |
| 201 | + |
| 202 | + /** |
| 203 | + * Specifies a list of glob patterns that match files to be included in compilation. |
| 204 | + * @see https://www.typescriptlang.org/tsconfig#include |
| 205 | + */ |
38 | 206 | "include": ["src/**/*"], |
| 207 | + |
| 208 | + /** |
| 209 | + * Specifies a list of files to be excluded from compilation. |
| 210 | + * @see https://www.typescriptlang.org/tsconfig#exclude |
| 211 | + */ |
39 | 212 | "exclude": ["node_modules", "dist"] |
40 | 213 | } |
0 commit comments