chore(eslint.config.js): refine eslint configuration
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 14 Jul 2024 16:48:57 +0000 (18:48 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 14 Jul 2024 16:48:57 +0000 (18:48 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
eslint.config.js
examples/typescript/http-server-pool/fastify-worker_threads/src/main.ts
src/pools/abstract-pool.ts

index 01d6dbfe1a9183de4db5ea97310ee1a1bc2f198d..f7004221dd74fe6aa1bc832e3eb6470f797779fb 100644 (file)
@@ -26,16 +26,16 @@ export default defineFlatConfig([
       ],
     },
   },
-  ...plugins['typescript-eslint'].config(
-    ...plugins['typescript-eslint'].configs.strictTypeChecked,
-    ...plugins['typescript-eslint'].configs.stylisticTypeChecked
-  ),
   ...neostandard({
     ts: true,
     globals: {
       ...globals.mocha,
     },
   }),
+  ...plugins['typescript-eslint'].config(
+    ...plugins['typescript-eslint'].configs.strictTypeChecked,
+    ...plugins['typescript-eslint'].configs.stylisticTypeChecked
+  ),
   {
     languageOptions: {
       parserOptions: {
index b9aba792c05a8e2459eecfac5a93457a4185da9a..d30e913cb8b7ca47cb6f8993cefc28ee6a177803 100644 (file)
@@ -17,7 +17,6 @@ const fastify = Fastify({
 
 const workerFile = join(
   dirname(fileURLToPath(import.meta.url)),
-  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
   `worker${extname(fileURLToPath(import.meta.url))}`
 )
 
index 89a256ae34ac40aa704be84232605c1216793a3e..defc41a0f9fda00fda7af57eeb7aa484d9913811 100644 (file)
@@ -1601,7 +1601,7 @@ export abstract class AbstractPool<
       ) {
         this.redistributeQueuedTasks(this.workerNodes.indexOf(workerNode))
       }
-      // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
+      // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, promise/no-promise-in-callback
       workerNode?.terminate().catch((error: unknown) => {
         this.emitter?.emit(PoolEvents.error, error)
       })