Skip to content

Commit 6308fdc

Browse files
Make ESLint config compatible with Node 18/20 (#5996)
1 parent 547af0b commit 6308fdc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

eslint.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { includeIgnoreFile } from '@eslint/compat';
33
import prettier from 'eslint-config-prettier';
44
import globals from 'globals';
55
import path from 'path';
6+
import { fileURLToPath } from 'node:url';
7+
8+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
69

710
export default [
811
js.configs.recommended,
@@ -22,5 +25,5 @@ export default [
2225
},
2326
},
2427
},
25-
includeIgnoreFile(path.resolve(import.meta.dirname, '.gitignore')),
28+
includeIgnoreFile(path.resolve(__dirname, '.gitignore')),
2629
];

0 commit comments

Comments
 (0)