chore: v2.4.13
[poolifier.git] / .eslintrc.js
index 2e396436b0d6d4c95af5a4764cb024fe2d1016ef..d7004cc55ff8460161f54f766086dd78d7612eb8 100644 (file)
@@ -1,4 +1,3 @@
-// @ts-check
 const { defineConfig } = require('eslint-define-config')
 
 module.exports = defineConfig({
@@ -18,19 +17,27 @@ 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',
       {
         skipWords: [
+          'Benoit',
           'benny',
           'browserslist',
           'builtins',
@@ -40,8 +47,13 @@ module.exports = defineConfig({
           'cpu',
           'cpus',
           'ctx',
+          'deprecations',
+          'dequeue',
+          'dequeued',
           'ecma',
+          'enqueue',
           'enum',
+          'errored',
           'esm',
           'fibonacci',
           'fs',
@@ -52,9 +64,11 @@ module.exports = defineConfig({
           'num',
           'os',
           'piscina',
+          'pnpm',
           'poolifier',
           'poolify',
           'readonly',
+          'resize',
           'serializable',
           'sinon',
           'threadjs',
@@ -65,7 +79,8 @@ module.exports = defineConfig({
           'unlink',
           'unregister',
           'utf8',
-          'workerpool'
+          'workerpool',
+          'wwr'
         ],
         skipIfMatch: ['^@.*', '^plugin:.*']
       }
@@ -77,7 +92,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',
@@ -91,20 +106,19 @@ module.exports = defineConfig({
           'error',
           { ignoreProperties: true }
         ],
-        'tsdoc/syntax': 'error'
+        'tsdoc/syntax': 'warn'
       }
     },
     {
       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'
       }
     },
     {
-      files: ['**/*.js'],
+      files: ['**/*.js', '**/*.mjs'],
       plugins: ['jsdoc'],
       extends: ['plugin:n/recommended', 'plugin:jsdoc/recommended', 'standard']
     },