Skip to content

Commit 4c451f4

Browse files
author
William Duncan
committed
stricter TypeScript compiler options
1 parent ac98707 commit 4c451f4

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

tsconfig.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* Visit https://aka.ms/tsconfig to read more about this file */
44

55
/* Projects */
6-
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
6+
"incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
88
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
@@ -53,17 +53,17 @@
5353
// "removeComments": true, /* Disable emitting comments. */
5454
// "noEmit": true, /* Disable emitting files from a compilation. */
5555
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
56-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
56+
"importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
5757
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
5858
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
5959
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
6060
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
6161
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
6262
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
6363
// "newLine": "crlf", /* Set the newline character for emitting files. */
64-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
64+
"stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
6565
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
66-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
66+
"noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
6767
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
6868
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
6969
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
@@ -72,29 +72,29 @@
7272
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
7373
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
7474
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
75-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
75+
"preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
7676
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
7777

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

9999
/* Completeness */
100100
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */

0 commit comments

Comments
 (0)