From e13b8576431078a466a696c70638b7dce16ac5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=BCrlimann?= Date: Wed, 8 Feb 2017 07:04:26 +0100 Subject: [PATCH] fix(build): fix test if linting should trigger on file change (#719) * fix(build): fix test if linting should trigger on file change * feat(lint): also lint files after being added, not just on change --- src/build.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/build.ts b/src/build.ts index 120a89a7..48cd29c7 100644 --- a/src/build.ts +++ b/src/build.ts @@ -173,9 +173,11 @@ export function buildUpdate(changedFiles: ChangedFile[], context: BuildContext) let requiresLintUpdate = false; for (const changedFile of changedFiles) { - if (changedFile.ext === '.ts' && changedFile.event === 'ch') { - requiresLintUpdate = true; - break; + if (changedFile.ext === '.ts') { + if (changedFile.event === 'change' || changedFile.event === 'add') { + requiresLintUpdate = true; + break; + } } } if (requiresLintUpdate) {