mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #15021 from RyanCavanaugh/lintFixes
Update linting to avoid typechecking for booleanTriviaRule
This commit is contained in:
@@ -9709,7 +9709,7 @@ namespace ts {
|
||||
const original = getTypeOfSymbol(property);
|
||||
const updated = f(original);
|
||||
members.set(property.name, updated === original ? property : createSymbolWithType(property, updated));
|
||||
};
|
||||
}
|
||||
return members;
|
||||
}
|
||||
|
||||
@@ -9753,7 +9753,7 @@ namespace ts {
|
||||
// Since get accessors already widen their return value there is no need to
|
||||
// widen accessor based properties here.
|
||||
members.set(prop.name, prop.flags & SymbolFlags.Property ? getWidenedProperty(prop) : prop);
|
||||
};
|
||||
}
|
||||
const stringIndexInfo = getIndexInfoOfType(type, IndexKind.String);
|
||||
const numberIndexInfo = getIndexInfoOfType(type, IndexKind.Number);
|
||||
return createAnonymousType(type.symbol, members, emptyArray, emptyArray,
|
||||
@@ -15129,7 +15129,7 @@ namespace ts {
|
||||
if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, /*reportErrors*/ false)) {
|
||||
break;
|
||||
}
|
||||
const index = excludeArgument ? indexOf(excludeArgument, true) : -1;
|
||||
const index = excludeArgument ? indexOf(excludeArgument, /*value*/ true) : -1;
|
||||
if (index < 0) {
|
||||
return candidate;
|
||||
}
|
||||
@@ -18757,7 +18757,7 @@ namespace ts {
|
||||
case SyntaxKind.ConstructorType:
|
||||
checkUnusedTypeParameters(<FunctionLikeDeclaration>node);
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1580,7 +1580,7 @@ namespace ts {
|
||||
delete wildcardDirectories[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return wildcardDirectories;
|
||||
|
||||
@@ -590,7 +590,7 @@ namespace ts {
|
||||
currentIdentifiers = node.identifiers;
|
||||
isCurrentFileExternalModule = isExternalModule(node);
|
||||
enclosingDeclaration = node;
|
||||
emitDetachedComments(currentText, currentLineMap, writer, writeCommentRange, node, newLine, true /* remove comments */);
|
||||
emitDetachedComments(currentText, currentLineMap, writer, writeCommentRange, node, newLine, /*removeComents*/ true);
|
||||
emitLines(node.statements);
|
||||
}
|
||||
|
||||
|
||||
@@ -1845,7 +1845,7 @@ namespace ts {
|
||||
case ParsingContext.JSDocTupleTypes: return Diagnostics.Type_expected;
|
||||
case ParsingContext.JSDocRecordMembers: return Diagnostics.Property_assignment_expected;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Parses a comma-delimited list of elements
|
||||
function parseDelimitedList<T extends Node>(kind: ParsingContext, parseElement: () => T, considerSemicolonAsDelimiter?: boolean): NodeArray<T> {
|
||||
|
||||
+6
-6
@@ -54,10 +54,10 @@ namespace ts {
|
||||
referenceCount: number;
|
||||
}
|
||||
|
||||
declare var require: any;
|
||||
declare var process: any;
|
||||
declare var global: any;
|
||||
declare var __filename: string;
|
||||
declare const require: any;
|
||||
declare const process: any;
|
||||
declare const global: any;
|
||||
declare const __filename: string;
|
||||
|
||||
export function getNodeMajorVersion() {
|
||||
if (typeof process === "undefined") {
|
||||
@@ -74,7 +74,7 @@ namespace ts {
|
||||
return parseInt(version.substring(1, dot));
|
||||
}
|
||||
|
||||
declare var ChakraHost: {
|
||||
declare const ChakraHost: {
|
||||
args: string[];
|
||||
currentDirectory: string;
|
||||
executingFile: string;
|
||||
@@ -368,7 +368,7 @@ namespace ts {
|
||||
if (eventName === "rename") {
|
||||
// When deleting a file, the passed baseFileName is null
|
||||
callback(!relativeFileName ? relativeFileName : normalizePath(combinePaths(directoryName, relativeFileName)));
|
||||
};
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1162,7 +1162,7 @@ namespace ts {
|
||||
statement = createStatement(
|
||||
createExportExpression(
|
||||
createIdentifier("__esModule"),
|
||||
createLiteral(true)
|
||||
createLiteral(/*value*/ true)
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -1175,7 +1175,7 @@ namespace ts {
|
||||
createIdentifier("exports"),
|
||||
createLiteral("__esModule"),
|
||||
createObjectLiteral([
|
||||
createPropertyAssignment("value", createLiteral(true))
|
||||
createPropertyAssignment("value", createLiteral(/*value*/ true))
|
||||
])
|
||||
]
|
||||
)
|
||||
|
||||
+1
-1
@@ -336,7 +336,7 @@ namespace ts {
|
||||
// is an absolute file name.
|
||||
directory == "" ? "." : directory,
|
||||
watchedDirectoryChanged, /*recursive*/ true);
|
||||
};
|
||||
}
|
||||
}
|
||||
return configParseResult;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user