summaryrefslogtreecommitdiff
path: root/eslint.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'eslint.config.js')
-rw-r--r--eslint.config.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/eslint.config.js b/eslint.config.js
index 2ba7fbb..c5b15cc 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -1,8 +1,13 @@
import js from '@eslint/js';
+import path from 'path';
import tseslint from '@typescript-eslint/eslint-plugin';
import tseslintParser from '@typescript-eslint/parser';
+import { fileURLToPath } from 'url';
import prettier from 'eslint-config-prettier';
+const __filename = fileURLToPath(import.meta.url);
+const __dirname = path.dirname(__filename);
+
export default [
// Global ignores (apply first)
{
@@ -23,7 +28,7 @@ export default [
parser: tseslintParser,
parserOptions: {
project: ['./tsconfig.json'], // Apply project-based parsing only here
- tsconfigRootDir: '.',
+ tsconfigRootDir: __dirname,
},
globals: { // Define Node.js globals if needed
NodeJS: true
@@ -39,4 +44,4 @@ export default [
},
// Prettier rules (apply last)
prettier,
-]; \ No newline at end of file
+];