mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
chore: run format
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user