Skip to content

Commit 131d139

Browse files
committed
build(eslint.config.js): use import to treated as an ES module
1 parent a14ac31 commit 131d139

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

eslint.config.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
const {
2-
defineConfig,
3-
globalIgnores,
4-
} = require("eslint/config");
1+
import { defineConfig, globalIgnores } from "eslint/config";
52

6-
const globals = require("globals");
3+
import globals from "globals";
74

8-
const {
9-
fixupConfigRules,
10-
fixupPluginRules,
11-
} = require("@eslint/compat");
5+
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
126

13-
const parser = require("vue-eslint-parser");
14-
const vue = require("eslint-plugin-vue");
15-
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
16-
const js = require("@eslint/js");
7+
import parser from "vue-eslint-parser";
8+
import vue from "eslint-plugin-vue";
9+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
10+
import js from "@eslint/js";
1711

1812
const {
1913
FlatCompat,
@@ -26,7 +20,7 @@ const compat = new FlatCompat({
2620
});
2721
require("@rushstack/eslint-patch/modern-module-resolution");
2822

29-
module.exports = defineConfig([{
23+
const config = defineConfig([{
3024
languageOptions: {
3125
globals: {
3226
...globals.browser,
@@ -81,3 +75,5 @@ module.exports = defineConfig([{
8175
},
8276
},
8377
}, globalIgnores(["src/components/icons/cryptos/*.vue"]), globalIgnores(["**/tests/", "**/__tests__/"])]);
78+
79+
export default config;

0 commit comments

Comments
 (0)