From cf549e06065d84bdd1a46ecbef00fc76ce5f07c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 14 Jul 2024 18:48:57 +0200 Subject: [PATCH] chore(eslint.config.js): refine eslint configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- eslint.config.js | 8 ++++---- .../http-server-pool/fastify-worker_threads/src/main.ts | 1 - src/pools/abstract-pool.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 01d6dbfe..f7004221 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -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: { diff --git a/examples/typescript/http-server-pool/fastify-worker_threads/src/main.ts b/examples/typescript/http-server-pool/fastify-worker_threads/src/main.ts index b9aba792..d30e913c 100644 --- a/examples/typescript/http-server-pool/fastify-worker_threads/src/main.ts +++ b/examples/typescript/http-server-pool/fastify-worker_threads/src/main.ts @@ -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))}` ) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 89a256ae..defc41a0 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -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) }) -- 2.34.1