Merge branch 'master' of github.com:poolifier/poolifier
[poolifier.git] / .eslintrc.js
index 4f57c1e21608a81ee836fc80d2122ed97881602a..9d0d7ce4cea3efda4777c7004a459cd307f8df57 100644 (file)
@@ -65,6 +65,7 @@ module.exports = defineConfig({
           'fibonacci',
           'fp',
           'fs',
+          'func',
           'inheritDoc',
           'javascript',
           'jsdoc',
@@ -131,7 +132,21 @@ module.exports = defineConfig({
     {
       files: ['examples/typescript/**/*.ts'],
       rules: {
-        'import/no-unresolved': 'off',
+        'import/no-unresolved': [
+          'error',
+          {
+            ignore: [
+              '^axios$',
+              '^express$',
+              '^fastify$',
+              '^fastify-plugin$',
+              '^node-fetch$',
+              '^nodemailer$',
+              '^poolifier$',
+              '^ws$'
+            ]
+          }
+        ],
         '@typescript-eslint/no-unsafe-argument': 'off',
         '@typescript-eslint/no-unsafe-call': 'off',
         '@typescript-eslint/no-unsafe-return': 'off',
@@ -149,40 +164,20 @@ module.exports = defineConfig({
       extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard']
     },
     {
-      files: ['tests/**/*.js'],
+      files: ['tests/**/*.js', 'tests/**/*.mjs'],
       rules: {
         'jsdoc/require-jsdoc': 'off'
       }
     },
-    {
-      files: ['tests/pools/selection-strategies/**/*.js'],
-      rules: {
-        'n/no-missing-require': 'off'
-      }
-    },
     {
       files: ['benchmarks/**/*.js', 'benchmarks/**/*.mjs'],
       rules: {
         'jsdoc/require-jsdoc': 'off'
       }
     },
-    {
-      files: ['benchmarks/versus-external-pools/**/*.js'],
-      rules: {
-        'n/no-missing-require': 'off'
-      }
-    },
-    {
-      files: ['benchmarks/versus-external-pools/**/*.mjs'],
-      rules: {
-        'n/no-missing-import': 'off',
-        'import/no-unresolved': 'off'
-      }
-    },
     {
       files: ['examples/javascript/**/*.js'],
       rules: {
-        'n/no-missing-require': 'off',
         'jsdoc/require-jsdoc': 'off'
       }
     }