Skip to content

Commit 0c78250

Browse files
committed
build(lint): update eslint configuration
1 parent ba64384 commit 0c78250

File tree

2 files changed

+33
-19
lines changed

2 files changed

+33
-19
lines changed

.eslintrc.json

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

eslint.config.mjs

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

0 commit comments

Comments
 (0)