build(deps-dev): apply updates
[poolifier.git] / eslint.config.js
index 8666f4c4a02ac7287b1a85bf448d62f9848d8cda..a736889210e5a3de77eae0564d0bdf1fb7c8cd85 100644 (file)
@@ -17,8 +17,21 @@ export default defineFlatConfig([
   js.configs.recommended,
   ...nodePlugin.configs['flat/mixed-esm-and-cjs'],
   jsdoc.configs['flat/recommended-typescript'],
-  // ...tseslint.config(...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked),
-  ...tseslint.config(...tseslint.configs.strict, ...tseslint.configs.stylistic),
+  {
+    rules: {
+      'jsdoc/check-tag-names': [
+        'warn',
+        {
+          typed: true,
+          definedTags: ['defaultValue', 'experimental', 'typeParam'],
+        },
+      ],
+    },
+  },
+  ...tseslint.config(
+    ...tseslint.configs.strictTypeChecked,
+    ...tseslint.configs.stylisticTypeChecked
+  ),
   ...neostandard({
     ts: true,
     globals: {
@@ -26,6 +39,14 @@ export default defineFlatConfig([
       ...globals.mocha,
     },
   }),
+  {
+    languageOptions: {
+      parserOptions: {
+        project: true,
+        tsconfigRootDir: import.meta.dirname,
+      },
+    },
+  },
   {
     plugins: {
       'simple-import-sort': simpleImportSort,
@@ -61,10 +82,21 @@ export default defineFlatConfig([
       '@stylistic/operator-linebreak': 'off',
     },
   },
+  {
+    files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
+    ...tseslint.configs.disableTypeChecked,
+  },
+  // examples specific configuration
   {
     files: ['examples/**/*.ts'],
     rules: {
-      'no-undef': 'off',
+      '@typescript-eslint/no-unsafe-argument': 'off',
+      '@typescript-eslint/no-unsafe-call': 'off',
+      '@typescript-eslint/no-unsafe-return': 'off',
+      '@typescript-eslint/no-unsafe-assignment': 'off',
+      '@typescript-eslint/no-unsafe-member-access': 'off',
+      '@typescript-eslint/no-unnecessary-type-assertion': 'off',
+      '@typescript-eslint/no-redundant-type-constituents': 'off',
     },
   },
   {
@@ -79,12 +111,14 @@ export default defineFlatConfig([
       '@typescript-eslint/no-require-imports': 'off',
     },
   },
+  // benchmarks specific configuration
   {
     files: ['benchmarks/**/*.cjs'],
     rules: {
       '@typescript-eslint/no-require-imports': 'off',
     },
   },
+  // tests specific configuration
   {
     files: ['tests/**/*.js', 'tests/**/*.mjs', 'tests/**/*.cjs'],
     rules: {