Skip to content

Commit cb90379

Browse files
committed
Prettier
1 parent aea69eb commit cb90379

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/models/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export class ModuleNode {
44
constructor(
55
public name: string,
66
public exports: ExportNode[],
7-
public imports: string[] | undefined = undefined
7+
public imports: string[] | undefined = undefined,
88
) {}
99
}

src/parsers/moduleParser.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,18 @@ export function parseModule(sourceFile: ts.SourceFile, context: ParserContext):
3838
.replace(/\\/g, '/');
3939

4040
const imports: string[] = sourceFile.statements
41-
.filter(s => ts.isImportDeclaration(s) && s.moduleSpecifier)
41+
.filter((s) => ts.isImportDeclaration(s) && s.moduleSpecifier)
4242
.map((statement) => {
4343
const importDeclaraion = statement as ts.ImportDeclaration;
4444
const text = importDeclaraion.moduleSpecifier.getText();
4545
return text.substring(1, text.length - 1); // Remove quotes
4646
});
4747

48-
return new ModuleNode(relativeModulePath, parsedModuleExports, imports.length > 0 ? imports : undefined);
48+
return new ModuleNode(
49+
relativeModulePath,
50+
parsedModuleExports,
51+
imports.length > 0 ? imports : undefined,
52+
);
4953
} catch (error) {
5054
if (!(error instanceof ParserError)) {
5155
throw new ParserError(error, parsedSymbolStack);

0 commit comments

Comments
 (0)