Skip to content

Commit e653cf8

Browse files
refactor: fix lint
1 parent a7e4cb5 commit e653cf8

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,11 @@ interface Hook {
262262
tap: (name: string | Tap, fn: (context?, ...args) => Result) => void;
263263
tapAsync: (
264264
name: string | Tap,
265-
fn: (context?, ...args, callback: (err: Error | null, result: Result) => void) => void
265+
fn: (
266+
context?,
267+
...args,
268+
callback: (err: Error | null, result: Result) => void
269+
) => void
266270
) => void;
267271
tapPromise: (
268272
name: string | Tap,
@@ -305,7 +309,10 @@ interface Hook {
305309
isUsed: () => boolean;
306310
call: (...args) => Result;
307311
promise: (...args) => Promise<Result>;
308-
callAsync: (...args, callback: (err: Error | null, result: Result) => void) => void;
312+
callAsync: (
313+
...args,
314+
callback: (err: Error | null, result: Result) => void
315+
) => void;
309316
}
310317

311318
interface HookMap {

lib/HookCodeFactory.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ class HookCodeFactory {
257257
}
258258
code += `}), function(_err${tapIndex}) {\n`;
259259
code += `if(_hasResult${tapIndex}) throw _err${tapIndex};\n`;
260-
code += onError(`!_err${tapIndex} ? new Error('Tap function (tapPromise) rejects "' + _err${tapIndex} + '" value') : _err${tapIndex}`);
260+
code += onError(
261+
`!_err${tapIndex} ? new Error('Tap function (tapPromise) rejects "' + _err${tapIndex} + '" value') : _err${tapIndex}`
262+
);
261263
code += "});\n";
262264
break;
263265
}

0 commit comments

Comments
 (0)