|
1 | | -const { |
2 | | - defineConfig, |
3 | | - globalIgnores, |
4 | | -} = require("eslint/config"); |
5 | 1 |
|
6 | | -const globals = require("globals"); |
7 | | -const tsParser = require("@typescript-eslint/parser"); |
8 | | -const typescriptEslint = require("@typescript-eslint/eslint-plugin"); |
9 | | -const react = require("eslint-plugin-react"); |
10 | | -const js = require("@eslint/js"); |
11 | | - |
12 | | -const { |
13 | | - FlatCompat, |
14 | | -} = require("@eslint/eslintrc"); |
| 2 | +import { fileURLToPath } from "node:url"; |
| 3 | +import { dirname } from "node:path"; |
| 4 | +import globals from "globals"; |
| 5 | +import tsParser from "@typescript-eslint/parser"; |
| 6 | +import typescriptEslint from "@typescript-eslint/eslint-plugin"; |
| 7 | +import react from "eslint-plugin-react"; |
| 8 | +import { defineConfig, globalIgnores } from "eslint/config"; |
| 9 | +import js from "@eslint/js"; |
| 10 | +import { FlatCompat } from "@eslint/eslintrc"; |
15 | 11 |
|
| 12 | +const __filename = fileURLToPath(import.meta.url); |
| 13 | +const __dirname = dirname(__filename); |
16 | 14 | const compat = new FlatCompat({ |
17 | 15 | baseDirectory: __dirname, |
18 | 16 | recommendedConfig: js.configs.recommended, |
19 | 17 | allConfig: js.configs.all |
20 | 18 | }); |
21 | 19 |
|
22 | | -module.exports = defineConfig([{ |
| 20 | +//module.exports = defineConfig([{ |
| 21 | +export default defineConfig([{ |
23 | 22 | languageOptions: { |
24 | 23 | globals: { |
25 | 24 | ...globals.browser, |
@@ -62,6 +61,7 @@ module.exports = defineConfig([{ |
62 | 61 | "@typescript-eslint/no-misused-promises": "error", |
63 | 62 | "@typescript-eslint/no-floating-promises": "error", |
64 | 63 | "@typescript-eslint/no-explicit-any": "off", |
| 64 | + "@typescript-eslint/no-empty-object-type": "off", |
65 | 65 | "@typescript-eslint/no-unused-expressions": "off", |
66 | 66 |
|
67 | 67 | "@typescript-eslint/no-unused-vars": ["warn", { |
|
0 commit comments