Skip to content

Commit

Permalink
fix: update example code (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxsan committed Dec 25, 2022
1 parent 17a9cd8 commit 499a038
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/content/blog/2022-08-05-new-config-system-part-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,12 @@ As mentioned previously, we felt like there needed to be a good amount of backwa

```js
import { FlatCompat } from "@eslint/eslintrc";
import path from "path";
import { fileURLToPath } from "url";

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname
Expand Down

0 comments on commit 499a038

Please sign in to comment.