From 1a4ec52712a2bc6b58c766141816110292f433ef Mon Sep 17 00:00:00 2001 From: Karl-Philipp Wulfert Date: Tue, 4 Jun 2019 15:20:55 +0200 Subject: [PATCH] fix: only check copyright years for TypeScript files Fixes #25 --- src/common.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common.ts b/src/common.ts index f5e6ffa7..df6c6914 100644 --- a/src/common.ts +++ b/src/common.ts @@ -562,6 +562,10 @@ export function checkCopyrightYears(path: PathLike, subDir: PathLike): void { const fileStats = lstatSync(fileSystemObjectPath); if (fileStats.isFile()) { + if (fileSystemObject.match(/\.ts$/) === null) { + continue; + } + const content = readFileSync(fileSystemObjectPath) .toString() .split('\n');