Benchmarks: fix workload function
[poolifier.git] / .eslintrc.js
index fe04926fd46565df433f78e3c01a083283bdbc85..59f0a1133f6abd76bba4543c75dfa10e861409d9 100644 (file)
@@ -7,6 +7,10 @@ module.exports = defineConfig({
     node: true,
     mocha: true
   },
+  parserOptions: {
+    ecmaVersion: 2021,
+    sourceType: 'module'
+  },
   plugins: ['promise', 'prettierx', 'jsdoc', 'spellcheck'],
   extends: [
     'standard',
@@ -31,16 +35,36 @@ module.exports = defineConfig({
       'warn',
       {
         skipWords: [
+          'browserslist',
+          'builtins',
           'christopher',
+          'cjs',
           'comparator',
+          'cpu',
+          'cpus',
+          'ctx',
           'ecma',
           'enum',
-          'inheritdoc',
+          'fibonacci',
+          'fs',
+          'inheritDoc',
           'jsdoc',
+          'microjob',
+          'num',
+          'os',
+          'piscina',
           'poolifier',
+          'poolify',
           'readonly',
           'serializable',
+          'sinon',
+          'threadjs',
+          'threadwork',
+          'tsconfig',
+          'typedoc',
+          'unlink',
           'unregister',
+          'utf8',
           'workerpool'
         ],
         skipIfMatch: ['^@.*', '^plugin:.*']
@@ -52,8 +76,6 @@ module.exports = defineConfig({
       files: ['**/*.ts'],
       parser: '@typescript-eslint/parser',
       parserOptions: {
-        ecmaVersion: 2020,
-        sourceType: 'module',
         project: './tsconfig.json'
       },
       plugins: ['@typescript-eslint'],
@@ -106,9 +128,19 @@ module.exports = defineConfig({
         'jsdoc/require-returns-type': 'off'
       }
     },
+    {
+      files: ['examples/typescript/**/*.ts'],
+      rules: {
+        'import/no-unresolved': 'off',
+        'jsdoc/require-jsdoc': 'off',
+        '@typescript-eslint/no-unsafe-argument': 'off',
+        '@typescript-eslint/no-unsafe-call': 'off',
+        '@typescript-eslint/no-unsafe-assignment': 'off'
+      }
+    },
     {
       files: ['**/*.js'],
-      extends: 'plugin:node/recommended'
+      extends: ['plugin:n/recommended']
     },
     {
       files: ['tests/**/*.js'],
@@ -116,16 +148,28 @@ module.exports = defineConfig({
         'jsdoc/require-jsdoc': 'off'
       }
     },
+    {
+      files: ['tests/pools/selection-strategies/**/*.js'],
+      rules: {
+        'n/no-missing-require': 'off'
+      }
+    },
     {
       files: ['benchmarks/**/*.js'],
       rules: {
         'jsdoc/require-jsdoc': 'off'
       }
     },
+    {
+      files: ['benchmarks/versus-external-pools/**/*.js'],
+      rules: {
+        'n/no-missing-require': 'off'
+      }
+    },
     {
       files: ['examples/**/*.js'],
       rules: {
-        'node/no-missing-require': 'off',
+        'n/no-missing-require': 'off',
         'jsdoc/require-jsdoc': 'off'
       }
     }