Enable max-statements-per-line lint rule (#45475)

* Enable the rule

* Fix all the violations
This commit is contained in:
Ryan Cavanaugh
2021-08-16 13:53:51 -07:00
committed by GitHub
parent 339ad92b98
commit e00b5ecd40
37 changed files with 215 additions and 109 deletions

View File

@@ -556,7 +556,7 @@ namespace ts {
// Visit project references first
if (cbRef) {
const result = cbRef(projectReferences, parent);
if (result) { return result; }
if (result) return result;
}
return forEach(resolvedProjectReferences, (resolvedRef, index) => {
@@ -2238,7 +2238,7 @@ namespace ts {
}
function getOptionsDiagnosticsOfConfigFile() {
if (!options.configFile) { return emptyArray; }
if (!options.configFile) return emptyArray;
let diagnostics = programDiagnostics.getDiagnostics(options.configFile.fileName);
forEachResolvedProjectReference(resolvedRef => {
diagnostics = concatenate(diagnostics, programDiagnostics.getDiagnostics(resolvedRef.sourceFile.fileName));