Skip to content

Commit f5ae870

Browse files
authored
Merge pull request #1744 from progfay/update-tsconfig
update `tsconfig.json`
2 parents 84c793f + 52907b6 commit f5ae870

File tree

1 file changed

+97
-61
lines changed

1 file changed

+97
-61
lines changed

tsconfig.json

Lines changed: 97 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,109 @@
11
{
22
"compilerOptions": {
3-
/* Visit https://aka.ms/tsconfig.json to read more about this file */
3+
/* Visit https://aka.ms/tsconfig to read more about this file */
44

5-
/* Basic Options */
6-
"incremental": true /* Enable incremental compilation */,
7-
"target": "ES2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
8-
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
9-
"lib": [
10-
"ES2017"
11-
] /* Specify library files to be included in the compilation. */,
12-
// "allowJs": true, /* Allow javascript files to be compiled. */
13-
// "checkJs": true, /* Report errors in .js files. */
14-
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
15-
"declaration": true /* Generates corresponding '.d.ts' file. */,
16-
"declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
17-
"sourceMap": true /* Generates corresponding '.map' file. */,
18-
// "outFile": "./", /* Concatenate and emit output to single file. */
19-
// "outDir": "./", /* Redirect output structure to the directory. */
20-
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
21-
"composite": true /* Enable project compilation */,
22-
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
23-
"removeComments": true /* Do not emit comments to output. */,
24-
// "noEmit": true, /* Do not emit outputs. */
25-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
26-
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
27-
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
5+
/* Projects */
6+
"incremental": true /* Save .tsbuildinfo files to allow for incremental compilation of projects. */,
7+
"composite": true /* Enable constraints that allow a TypeScript project to be used with project references. */,
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
2812

29-
/* Strict Type-Checking Options */
30-
"strict": true /* Enable all strict type-checking options. */,
31-
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
32-
// "strictNullChecks": true, /* Enable strict null checks. */
33-
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
34-
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
35-
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
36-
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
37-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
13+
/* Language and Environment */
14+
"target": "es2018" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16+
// "jsx": "preserve", /* Specify what JSX code is generated. */
17+
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
18+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22+
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26+
27+
/* Modules */
28+
"module": "commonjs" /* Specify what module code is generated. */,
29+
// "rootDir": "./", /* Specify the root folder within your source files. */
30+
"moduleResolution": "Node" /* Specify how TypeScript looks up a file from a given module specifier. */,
31+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34+
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35+
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
36+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37+
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38+
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
39+
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
40+
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
41+
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
42+
// "resolveJsonModule": true, /* Enable importing .json files. */
43+
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
44+
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
3845

39-
/* Additional Checks */
40-
"noUnusedLocals": true /* Report errors on unused locals. */,
41-
"noUnusedParameters": true /* Report errors on unused parameters. */,
42-
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
43-
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
44-
"noUncheckedIndexedAccess": true /* Include 'undefined' in index signature results */,
46+
/* JavaScript Support */
47+
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
48+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
49+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
4550

46-
/* Module Resolution Options */
47-
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
48-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
49-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
50-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
51-
// "typeRoots": [], /* List of folders to include type definitions from. */
52-
// "types": [], /* Type declaration files to be included in compilation. */
53-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
54-
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
55-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
56-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
51+
/* Emit */
52+
"declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
53+
"declarationMap": true /* Create sourcemaps for d.ts files. */,
54+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
55+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
56+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
57+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
58+
// "outDir": "./", /* Specify an output folder for all emitted files. */
59+
"removeComments": true /* Disable emitting comments. */,
60+
// "noEmit": true, /* Disable emitting files from a compilation. */
61+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
62+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
63+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
64+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
65+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
66+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
67+
// "newLine": "crlf", /* Set the newline character for emitting files. */
68+
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
69+
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
70+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
71+
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
72+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
5773

58-
/* Source Map Options */
59-
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
60-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
61-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
62-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
74+
/* Interop Constraints */
75+
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
76+
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
77+
// "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
78+
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
79+
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
80+
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
81+
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
6382

64-
/* Experimental Options */
65-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
66-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
83+
/* Type Checking */
84+
"strict": true /* Enable all strict type-checking options. */,
85+
"noImplicitAny": true /* Enable error reporting for expressions and declarations with an implied 'any' type. */,
86+
"strictNullChecks": true /* When type checking, take into account 'null' and 'undefined'. */,
87+
"strictFunctionTypes": true /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */,
88+
"strictBindCallApply": true /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */,
89+
"strictPropertyInitialization": true /* Check for class properties that are declared but not set in the constructor. */,
90+
"noImplicitThis": true /* Enable error reporting when 'this' is given the type 'any'. */,
91+
"useUnknownInCatchVariables": true /* Default catch clause variables as 'unknown' instead of 'any'. */,
92+
"alwaysStrict": true /* Ensure 'use strict' is always emitted. */,
93+
"noUnusedLocals": true /* Enable error reporting when local variables aren't read. */,
94+
"noUnusedParameters": true /* Raise an error when a function parameter isn't read. */,
95+
"exactOptionalPropertyTypes": true /* Interpret optional property types as written, rather than adding 'undefined'. */,
96+
"noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */,
97+
"noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */,
98+
"noUncheckedIndexedAccess": true /* Add 'undefined' to a type when accessed using an index. */,
99+
"noImplicitOverride": true /* Ensure overriding members in derived classes are marked with an override modifier. */,
100+
"noPropertyAccessFromIndexSignature": true /* Enforces using indexed accessors for keys declared using an indexed type. */,
101+
"allowUnusedLabels": true /* Disable error reporting for unused labels. */,
102+
"allowUnreachableCode": true /* Disable error reporting for unreachable code. */,
67103

68-
/* Advanced Options */
69-
"skipLibCheck": true /* Skip type checking of declaration files. */,
70-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
104+
/* Completeness */
105+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
106+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
71107
},
72108
"include": ["src/**/*"]
73109
}

0 commit comments

Comments
 (0)