summaryrefslogtreecommitdiff
path: root/cli/js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js')
-rw-r--r--cli/js/compiler_host.ts8
-rw-r--r--cli/js/compiler_util.ts6
2 files changed, 9 insertions, 5 deletions
diff --git a/cli/js/compiler_host.ts b/cli/js/compiler_host.ts
index d44bc7a03..78ed4889a 100644
--- a/cli/js/compiler_host.ts
+++ b/cli/js/compiler_host.ts
@@ -47,18 +47,18 @@ export const defaultBundlerOptions: ts.CompilerOptions = {
/** Default options used by the compiler Host when compiling. */
export const defaultCompileOptions: ts.CompilerOptions = {
- allowJs: true,
+ allowJs: false,
allowNonTsExtensions: true,
- strict: true,
checkJs: false,
esModuleInterop: true,
+ jsx: ts.JsxEmit.React,
module: ts.ModuleKind.ESNext,
outDir: OUT_DIR,
resolveJsonModule: true,
sourceMap: true,
+ strict: true,
stripComments: true,
- target: ts.ScriptTarget.ESNext,
- jsx: ts.JsxEmit.React
+ target: ts.ScriptTarget.ESNext
};
/** Options that need to be used when doing a runtime (non bundled) compilation */
diff --git a/cli/js/compiler_util.ts b/cli/js/compiler_util.ts
index a28e2d109..6da38ab3b 100644
--- a/cli/js/compiler_util.ts
+++ b/cli/js/compiler_util.ts
@@ -304,7 +304,11 @@ export const ignoredDiagnostics = [
// support JSON imports. Allegedly this was fixed in
// Microsoft/TypeScript#26825 but that doesn't seem to be working here,
// so we will ignore complaints about this compiler setting.
- 5070
+ 5070,
+ // TS7016: Could not find a declaration file for module '...'. '...'
+ // implicitly has an 'any' type. This is due to `allowJs` being off by
+ // default but importing of a JavaScript module.
+ 7016
];
/** When doing a host configuration, processing the response and logging out