From 237014e823ad4fba7bea50bdf8ec9b5a5cc25918 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 19 Dec 2018 15:06:11 +0100 Subject: Disable linter no a hanging promise with a comment --- packages/sol-compiler/src/compiler.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/sol-compiler/src/compiler.ts') diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index 986999254..b3531ab65 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -33,7 +33,6 @@ import { } from './utils/compiler'; import { constants } from './utils/constants'; import { fsWrapper } from './utils/fs_wrapper'; -import { CompilationError } from './utils/types'; import { utils } from './utils/utils'; type TYPE_ALL_FILES_IDENTIFIER = '*'; @@ -157,7 +156,9 @@ export class Compiler { watcher.on('change', (changedFilePath: string) => { console.clear(); // tslint:disable-line:no-console utils.logWithTime('File change detected. Starting incremental compilation...'); - onFileChangedAsync(); + // NOTE: We can't await it here because that's a callback. + // Instead we stop watching inside of it and start it again when we're finished. + onFileChangedAsync(); // tslint:disable-line no-floating-promises }); } private _getPathsToWatch(): string[] { -- cgit v1.2.3