fix: fix eslint configuration
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 1 May 2023 14:38:44 +0000 (16:38 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 1 May 2023 14:38:44 +0000 (16:38 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
.eslintrc.js
examples/typescript/pool.ts

index 6ff6e4c175f2406b08b3931af08c16c777d98123..5845044780d7fdcee92dd5419fe725857bcf3ec4 100644 (file)
@@ -17,6 +17,13 @@ module.exports = defineConfig({
     'plugin:import/recommended',
     'plugin:promise/recommended'
   ],
+  settings: {
+    'import/resolver': {
+      typescript: {
+        project: './tsconfig.eslint.json'
+      }
+    }
+  },
   rules: {
     'sort-imports': [
       'error',
@@ -104,7 +111,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'
index c2d0a1b8d1f1ba004993d820f8dcdef28f3bd7aa..7268ebdc599cfaf6a8951583c5d06d1ced71f9c3 100644 (file)
@@ -1,6 +1,6 @@
 import { join } from 'path'
-import { DynamicThreadPool, FixedThreadPool } from 'poolifier'
 import type { MyData, MyResponse } from './worker'
+import { DynamicThreadPool, FixedThreadPool } from 'poolifier'
 
 export const fixedPool = new FixedThreadPool<MyData, Promise<MyResponse>>(
   8,