mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 20:25:48 -06:00
Add --checkJsFiles
This commit is contained in:
parent
f7242f3983
commit
0b1fff7e66
@ -481,6 +481,12 @@ namespace ts {
|
||||
name: "plugin",
|
||||
type: "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "checkJsFiles",
|
||||
type: "boolean",
|
||||
experimental: true,
|
||||
description: Diagnostics.Report_errors_in_js_files
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@ -3362,5 +3362,9 @@
|
||||
"Octal literals are not allowed in enums members initializer. Use the syntax '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 8018
|
||||
},
|
||||
"Report errors in .js files.": {
|
||||
"category": "Message",
|
||||
"code": 8019
|
||||
}
|
||||
}
|
||||
|
||||
@ -907,7 +907,7 @@ namespace ts {
|
||||
// For JavaScript files, we don't want to report semantic errors.
|
||||
// Instead, we'll report errors for using TypeScript-only constructs from within a
|
||||
// JavaScript file when we get syntactic diagnostics for the file.
|
||||
const checkDiagnostics = isSourceFileJavaScript(sourceFile) ? [] : typeChecker.getDiagnostics(sourceFile, cancellationToken);
|
||||
const checkDiagnostics = !options.checkJsFiles && isSourceFileJavaScript(sourceFile) ? [] : typeChecker.getDiagnostics(sourceFile, cancellationToken);
|
||||
const fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName);
|
||||
const programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName);
|
||||
|
||||
|
||||
@ -3312,6 +3312,7 @@
|
||||
alwaysStrict?: boolean; // Always combine with strict property
|
||||
baseUrl?: string;
|
||||
charset?: string;
|
||||
checkJsFiles?: boolean;
|
||||
/* @internal */ configFilePath?: string;
|
||||
declaration?: boolean;
|
||||
declarationDir?: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user