From: Jérôme Benoit Date: Sun, 14 Jul 2024 16:48:57 +0000 (+0200) Subject: chore(eslint.config.js): refine eslint configuration X-Git-Tag: v4.1.0~14 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=cf549e06065d84bdd1a46ecbef00fc76ce5f07c4;p=poolifier.git chore(eslint.config.js): refine eslint configuration Signed-off-by: Jérôme Benoit --- 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) })