From 58192b28b855312e2275b1ab4cd60d94ee50a862 Mon Sep 17 00:00:00 2001 From: Dmitri1337 Date: Wed, 16 Jan 2019 19:21:25 +0200 Subject: [PATCH] Fixed "no-consecutive-blank-lines" lint rule --- types/async/test/explicit.ts | 1 - types/async/test/index.ts | 9 --------- types/async/tslint.json | 1 - 3 files changed, 11 deletions(-) diff --git a/types/async/test/explicit.ts b/types/async/test/explicit.ts index 7435d9a370..8f910e4b37 100644 --- a/types/async/test/explicit.ts +++ b/types/async/test/explicit.ts @@ -39,7 +39,6 @@ async.parallelLimit(taskArray, 3, function(err, results) { } }); - interface Lookup { [key: string]: T; } interface NumberCallback { (err?: Error, result?: number): void; } interface AsyncNumberGetter { (callback: NumberCallback): void; } diff --git a/types/async/test/index.ts b/types/async/test/index.ts index 1190e116a5..9a7e033e2a 100644 --- a/types/async/test/index.ts +++ b/types/async/test/index.ts @@ -102,7 +102,6 @@ async.all(['file1', 'file2', 'file3'], funcStringCbErrBoolean, function(err: Err async.concat(['dir1', 'dir2', 'dir3'], fs.readdir, function(err, files) { }); async.concatSeries(['dir1', 'dir2', 'dir3'], fs.readdir, function(err, files) { }); - // Control Flow // async.series([ @@ -193,7 +192,6 @@ async.parallel([ ], function(err, results) { }); - async.parallel({ one: function(callback) { setTimeout(function() { @@ -238,7 +236,6 @@ async.parallelLimit({ function(err, results) { } ); - function whileFn(callback: any) { setTimeout(() => callback(null, ++count), 1000); } @@ -273,13 +270,11 @@ async.waterfall([ } ], function(err, result) { }); - const q = async.queue(function(task: any, callback: (err?: Error, msg?: string) => void) { console.log('hello ' + task.name); callback(undefined, 'a message.'); }, 2); - q.drain = function() { console.log('all items have been processed'); }; @@ -380,7 +375,6 @@ const cargo = async.cargo(function(tasks, callback) { callback(); }, 2); - // add some items cargo.push({ name: 'foo' }, function(err: Error) { console.log('finished processing foo'); @@ -441,7 +435,6 @@ async.retry(3, function(callback, results) { }, function(err, result) { }); async.retry({ times: 3, interval: 200 }, function(callback, results) { }, function(err, result) { }); async.retry({ times: 3, interval: (retryCount) => 200 * retryCount }, function(callback, results) { }, function(err, result) { }); - async.parallel([ function(callback: (err: Error, val: string) => void) { }, function(callback) { } @@ -458,7 +451,6 @@ async.parallel([ async.apply(fs.writeFile, 'testfile2', 'test2'), ]); - async.parallel([ function(callback) { fs.writeFile('testfile1', 'test1', callback); @@ -748,7 +740,6 @@ wrapped1({ bar: 'bar' }, function(err: Error, data: any) { console.log(`async.timeout 1 end ${data}`); }); - function myFunction2(callback: (err?: Error, result?: any) => void): void { console.log(`async.timeout 2`); return callback(undefined, { bar: 'bar' }); diff --git a/types/async/tslint.json b/types/async/tslint.json index 94e7dc42fd..825ad443c1 100644 --- a/types/async/tslint.json +++ b/types/async/tslint.json @@ -4,7 +4,6 @@ "ban-types": true, // PRODUCES ERRORS WHEN REMOVED "callable-types": false, // HAS ISSUES "comment-format": true, // PRODUCES ERRORS WHEN REMOVED - "no-consecutive-blank-lines": false, // HAS ISSUES "no-unnecessary-generics": false, // HAS ISSUES "no-var-keyword": false, // HAS ISSUES "no-void-expression": false, // HAS ISSUES