Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 44e8bd9

Browse files
committed
chore(logging): don't log warning about multiple class declarations in a file
1 parent 3502360 commit 44e8bd9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/util/typescript-utils.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,7 @@ export function checkIfFunctionIsCalled(filePath: string, fileContent: string, f
161161
}
162162

163163
export function getClassDeclarations(sourceFile: SourceFile) {
164-
const classDeclarations = findNodes(sourceFile, sourceFile, SyntaxKind.ClassDeclaration, true) as ClassDeclaration[];
165-
if (classDeclarations.length > 1) {
166-
Logger.warn(`The following file has multiple class declarations in it:
167-
${sourceFile.fileName}
168-
In general, it's considered a best practice to have at most one class declaration per file.`);
169-
}
170-
return classDeclarations;
164+
return findNodes(sourceFile, sourceFile, SyntaxKind.ClassDeclaration, true) as ClassDeclaration[];
171165
}
172166

173167
export function getNgModuleClassName(filePath: string, fileContent: string) {

0 commit comments

Comments
 (0)