chore: v2.6.9
[poolifier.git] / .eslintrc.js
index 0a343d6b4e4f5899bd8b7d4f3a80aa541d602c0b..e421cd282cf758417b1609b6a887f4335619b708 100644 (file)
@@ -1,4 +1,3 @@
-// @ts-check
 const { defineConfig } = require('eslint-define-config')
 
 module.exports = defineConfig({
@@ -18,14 +17,21 @@ module.exports = defineConfig({
     'plugin:import/recommended',
     'plugin:promise/recommended'
   ],
+  settings: {
+    'import/resolver': {
+      typescript: {
+        project: './tsconfig.eslint.json'
+      }
+    }
+  },
   rules: {
     'sort-imports': [
-      'warn',
+      'error',
       {
-        ignoreMemberSort: true,
         ignoreDeclarationSort: true
       }
     ],
+    'import/order': 'error',
 
     'spellcheck/spell-checker': [
       'warn',
@@ -37,13 +43,16 @@ module.exports = defineConfig({
           'builtins',
           'christopher',
           'cjs',
+          'cloneable',
           'comparator',
           'cpu',
           'cpus',
           'ctx',
           'deprecations',
           'dequeue',
+          'dequeued',
           'ecma',
+          'elu',
           'enqueue',
           'enum',
           'errored',
@@ -56,16 +65,17 @@ module.exports = defineConfig({
           'mjs',
           'num',
           'os',
+          'perf',
           'piscina',
           'pnpm',
           'poolifier',
           'poolify',
           'readonly',
           'resize',
-          'serializable',
           'sinon',
           'threadjs',
           'threadwork',
+          'tinypool',
           'tsconfig',
           'tsdoc',
           'typedoc',
@@ -85,7 +95,7 @@ module.exports = defineConfig({
       plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc'],
       parser: '@typescript-eslint/parser',
       parserOptions: {
-        project: './tsconfig.json'
+        project: './tsconfig.eslint.json'
       },
       extends: [
         'plugin:@typescript-eslint/eslint-recommended',
@@ -105,7 +115,6 @@ module.exports = defineConfig({
     {
       files: ['examples/typescript/**/*.ts'],
       rules: {
-        'import/no-unresolved': 'off',
         '@typescript-eslint/no-unsafe-argument': 'off',
         '@typescript-eslint/no-unsafe-call': 'off',
         '@typescript-eslint/no-unsafe-assignment': 'off'
@@ -129,7 +138,7 @@ module.exports = defineConfig({
       }
     },
     {
-      files: ['benchmarks/**/*.js'],
+      files: ['benchmarks/**/*.js', 'benchmarks/**/*.mjs'],
       rules: {
         'jsdoc/require-jsdoc': 'off'
       }
@@ -140,6 +149,13 @@ module.exports = defineConfig({
         'n/no-missing-require': 'off'
       }
     },
+    {
+      files: ['benchmarks/versus-external-pools/**/*.mjs'],
+      rules: {
+        'n/no-missing-import': 'off',
+        'import/no-unresolved': 'off'
+      }
+    },
     {
       files: ['examples/**/*.js'],
       rules: {