Cleanups
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Oct 2022 22:05:40 +0000 (00:05 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Oct 2022 22:05:40 +0000 (00:05 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
.eslintrc.js
.vscode/settings.json
benchmarks/internal/benchmark-utils.js
tests/worker-files/cluster/emptyWorker.js
tests/worker-files/cluster/errorWorker.js
tests/worker-files/thread/emptyWorker.js
tests/worker-files/thread/errorWorker.js

index 11fb2803e0eac7e59ca325948ae07cfc521a07a3..f9453f90f5dd8825e45180a5f8b61004689ff444 100644 (file)
@@ -35,6 +35,7 @@ module.exports = defineConfig({
       'warn',
       {
         skipWords: [
+          'browserslist',
           'christopher',
           'comparator',
           'cpu',
@@ -44,12 +45,14 @@ module.exports = defineConfig({
           'fibonacci',
           'inheritDoc',
           'jsdoc',
+          'num',
           'os',
           'poolifier',
           'readonly',
           'serializable',
           'sinon',
           'tsconfig',
+          'typedoc',
           'unregister',
           'workerpool'
         ],
index 24c78410f76ecc1f8cb9a5ec610de86f776a5154..6aff44009abb346b7d98f0ce132c01a96ebd37d0 100644 (file)
@@ -6,18 +6,25 @@
     "Alessandro",
     "Ardizio",
     "Benoit",
+    "caffeinate",
     "Dependabot",
     "Gitter",
-    "Shinigami",
     "inheritDoc",
     "lcov",
     "loglevel",
     "markdownlint",
+    "microjob",
+    "MYBENCH",
     "piment",
     "poolifier",
+    "poolify",
     "prettierx",
     "serializable",
+    "Shinigami",
     "standardx",
+    "suchmokuo",
+    "threadjs",
+    "threadwork",
     "workerpool"
   ],
   "sonarlint.connectedMode.project": {
index 60cecbe5c8b565314c59549244e72db6c7178220..8ea43599282949a246d684dcf483a07c68377568 100644 (file)
@@ -10,7 +10,7 @@ async function runPoolifierTest (pool, { tasks, workerData }) {
     for (let i = 1; i <= tasks; i++) {
       pool
         .execute(workerData)
-        .then(res => {
+        .then(() => {
           executions++
           if (executions === tasks) {
             return resolve('FINISH')
@@ -73,7 +73,7 @@ function executeWorkerFunction (data) {
     case WorkerFunctions.jsonIntegerSerialization:
       return jsonIntegerSerialization(data.n || 1000)
     case WorkerFunctions.fibonacci:
-      return fibonacci(data.n || 50)
+      return fibonacci(data.n || 1000)
     case WorkerFunctions.factorial:
       return factorial(data.n || 1000)
     default:
index 58c55af12b8c171a12c8b430a3b32b3e2d7c0dc5..a0c94085897af10321a34427c076d4f7cdad01e5 100644 (file)
@@ -1,7 +1,7 @@
 'use strict'
 const { ClusterWorker, KillBehaviors } = require('../../../lib/index')
 
-function test (data) {}
+function test () {}
 
 module.exports = new ClusterWorker(test, {
   maxInactiveTime: 500,
index d6d9297ac8e5f671c3249622139c3ba0c8b8d8b6..d23ba27b31692d74866fdd2ddb2f9caf8763fac7 100644 (file)
@@ -1,7 +1,7 @@
 'use strict'
 const { ClusterWorker, KillBehaviors } = require('../../../lib/index')
 
-function error (data) {
+function error () {
   throw new Error('Error Message from ClusterWorker')
 }
 
index 6a146c2653496f99238945c6648aa1dbe51ab4e2..191c033127e46ea054c5d425948e3c50a8df47c4 100644 (file)
@@ -1,7 +1,7 @@
 'use strict'
 const { ThreadWorker, KillBehaviors } = require('../../../lib/index')
 
-function test (data) {}
+function test () {}
 
 module.exports = new ThreadWorker(test, {
   maxInactiveTime: 500,
index 841af907f1b2f6c290282c91adfc6afec5ae4ed4..c33dc1f0eb5e7c454a8ae355fe0c997761c32c56 100644 (file)
@@ -1,7 +1,7 @@
 'use strict'
 const { ThreadWorker, KillBehaviors } = require('../../../lib/index')
 
-function error (data) {
+function error () {
   throw new Error('Error Message from ThreadWorker')
 }