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

Commit

Permalink
fix(build): fix test if linting should trigger on file change (#719)
Browse files Browse the repository at this point in the history
* fix(build): fix test if linting should trigger on file change

* feat(lint): also lint files after being added, not just on change
  • Loading branch information
huerlisi authored and danbucholtz committed Feb 8, 2017
1 parent f805bf6 commit e13b857
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e13b857

Please sign in to comment.