chore: run format

This commit is contained in:
Vlad Frangu
2025-10-05 16:13:56 +03:00
parent 2a712d4909
commit 8dc1692d87
189 changed files with 3172 additions and 916 deletions

View File

@@ -441,7 +441,9 @@ export class Collector {
* The star is used as a delimiter because it is not a legal identifier character.
*/
public static getSortKeyIgnoringUnderscore(identifier: string | undefined): string {
if (!identifier) return '';
if (!identifier) {
return '';
}
let parts: string[];
@@ -532,7 +534,10 @@ export class Collector {
entryPoint: IWorkingPackageEntryPoint,
alreadySeenAstEntities: Set<AstEntity>,
): void {
if (alreadySeenAstEntities.has(astEntity)) return;
if (alreadySeenAstEntities.has(astEntity)) {
return;
}
alreadySeenAstEntities.add(astEntity);
if (astEntity instanceof AstSymbol) {

View File

@@ -122,7 +122,9 @@ export class CollectorEntity {
*/
public get exported(): boolean {
// Exported from top-level?
if (this.exportedFromEntryPoint) return true;
if (this.exportedFromEntryPoint) {
return true;
}
// Exported from parent?
for (const localExportNames of this._localExportNamesByParent.values()) {
@@ -162,7 +164,9 @@ export class CollectorEntity {
*/
public get consumable(): boolean {
// Exported from top-level?
if (this.exportedFromEntryPoint) return true;
if (this.exportedFromEntryPoint) {
return true;
}
// Exported from consumable parent?
for (const [parent, localExportNames] of this._localExportNamesByParent) {

View File

@@ -99,14 +99,18 @@ export class SourceMapper {
}
const sourceMap: ISourceMap | null = this._getSourceMap(sourceFilePath);
if (!sourceMap) return;
if (!sourceMap) {
return;
}
const nearestMappingItem: MappingItem | undefined = SourceMapper._findNearestMappingItem(sourceMap.mappingItems, {
line: sourceFileLine,
column: sourceFileColumn,
});
if (!nearestMappingItem) return;
if (!nearestMappingItem) {
return;
}
const mappedFilePath: string = path.resolve(path.dirname(sourceFilePath), nearestMappingItem.source);
@@ -132,7 +136,9 @@ export class SourceMapper {
}
// Don't translate coordinates to a file that doesn't exist
if (!originalFileInfo.fileExists) return;
if (!originalFileInfo.fileExists) {
return;
}
// The nearestMappingItem anchor may be above/left of the real position, due to gaps in the mapping. Calculate
// the delta and apply it to the original position.