File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change
1
+ import { dirname } from 'node:path' ;
2
+ import { fileURLToPath } from 'node:url' ;
3
+
1
4
import { defineConfig , globalIgnores } from "eslint/config" ;
2
5
3
6
import globals from "globals" ;
@@ -9,16 +12,16 @@ import vue from "eslint-plugin-vue";
9
12
import typescriptEslint from "@typescript-eslint/eslint-plugin" ;
10
13
import js from "@eslint/js" ;
11
14
12
- const {
13
- FlatCompat,
14
- } = require ( "@eslint/eslintrc" ) ;
15
+ import { FlatCompat } from "@eslint/eslintrc" ;
16
+
17
+ const __filename = fileURLToPath ( import . meta. url ) ;
18
+ const __dirname = dirname ( __filename ) ;
15
19
16
20
const compat = new FlatCompat ( {
17
21
baseDirectory : __dirname ,
18
22
recommendedConfig : js . configs . recommended ,
19
23
allConfig : js . configs . all
20
24
} ) ;
21
- require ( "@rushstack/eslint-patch/modern-module-resolution" ) ;
22
25
23
26
const config = defineConfig ( [ {
24
27
languageOptions : {
You can’t perform that action at this time.
0 commit comments