Use prettierx and eslint native (#85)
[poolifier.git] / src / workers.ts
index 9ead4d47bc1e4b2d8545fcaa10f9c1b29b4840cf..e7db2c3fdeb5c1b1afa980b042c97c8cc0b703d0 100644 (file)
@@ -1,5 +1,3 @@
-/* eslint-disable @typescript-eslint/strict-boolean-expressions */
-
 import { isMainThread, parentPort } from 'worker_threads'
 
 import { AsyncResource } from 'async_hooks'
@@ -28,6 +26,7 @@ export interface ThreadWorkerOptions {
  * @author [Alessandro Pio Ardizio](https://github.com/pioardi)
  * @since 0.0.1
  */
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
 export class ThreadWorker<Data = any, Response = any> extends AsyncResource {
   protected readonly maxInactiveTime: number
   protected readonly async: boolean
@@ -90,7 +89,7 @@ export class ThreadWorker<Data = any, Response = any> extends AsyncResource {
 
   protected run (
     fn: (data: Data) => Response,
-    value: { readonly data: Data, readonly id: number }
+    value: { readonly data: Data; readonly id: number }
   ): void {
     try {
       const res = fn(value.data)
@@ -104,7 +103,7 @@ export class ThreadWorker<Data = any, Response = any> extends AsyncResource {
 
   protected runAsync (
     fn: (data: Data) => Promise<Response>,
-    value: { readonly data: Data, readonly id: number }
+    value: { readonly data: Data; readonly id: number }
   ): void {
     fn(value.data)
       .then(res => {