We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d979cc commit 803e4afCopy full SHA for 803e4af
docs/src/use/configure/ignore.md
@@ -183,12 +183,9 @@ If you want to include patterns from a `.gitignore` file or any other file with
183
// eslint.config.js
184
import { defineConfig } from "eslint/config";
185
import { includeIgnoreFile } from "@eslint/compat";
186
-import path from "node:path";
187
import { fileURLToPath } from "node:url";
188
189
-const __filename = fileURLToPath(import.meta.url);
190
-const __dirname = path.dirname(__filename);
191
-const gitignorePath = path.resolve(__dirname, ".gitignore");
+const gitignorePath = fileURLToPath(new URL(".gitignore", import.meta.url));
192
193
export default defineConfig([
194
includeIgnoreFile(gitignorePath),
0 commit comments