Skip to content

Commit 65362b1

Browse files
[ERSSUP-84813]-[]-[Migrate eslint config for version 9.x]-[DMW]
1 parent 185234a commit 65362b1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

sandbox/src/eslint.config.mjs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
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+
},
30+
31+
rules: {},
32+
}]);

0 commit comments

Comments
 (0)