Skip to content

Commit 2d77656

Browse files
committed
FIX: Maybe?
1 parent ba5338f commit 2d77656

File tree

2 files changed

+30
-23
lines changed

2 files changed

+30
-23
lines changed

.eslintrc.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
1-
import js from "@eslint/js";
2-
import globals from "globals";
31
import { defineConfig } from "eslint/config";
2+
import globals from "globals";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default defineConfig([{
17+
extends: compat.extends("eslint:recommended"),
18+
19+
languageOptions: {
20+
globals: {
21+
...globals.commonjs,
22+
...globals.node,
23+
Atomics: "readonly",
24+
SharedArrayBuffer: "readonly",
25+
},
26+
27+
ecmaVersion: 2018,
28+
sourceType: "commonjs",
29+
},
430

5-
export default defineConfig([
6-
{ files: ["**/*.{js,mjs,cjs}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
7-
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
8-
]);
31+
rules: {},
32+
}]);

0 commit comments

Comments
 (0)