diff --git a/eslint.config.js b/eslint.config.js index 56afe8b3b97..53a377bbde7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -6,6 +6,7 @@ import fs from 'fs'; import path from 'path'; import tseslint from 'typescript-eslint'; +import { fileURLToPath } from 'url'; import stylisticTs from '@stylistic/eslint-plugin-ts'; import pluginLocal from 'eslint-plugin-local'; @@ -14,7 +15,7 @@ import pluginJsdoc from 'eslint-plugin-jsdoc'; import pluginHeader from 'eslint-plugin-header'; pluginHeader.rules.header.meta.schema = false; -const __dirname = path.dirname(new URL(import.meta.url).pathname); +const __dirname = path.dirname(fileURLToPath(import.meta.url)); const ignores = fs.readFileSync(path.join(__dirname, '.eslint-ignore'), 'utf8') .toString() .split(/\r\n|\n/)