Skip to content

Commit 7361d5e

Browse files
authored
chore: upgrade eslint to v9 (#54)
1 parent 624c869 commit 7361d5e

File tree

8 files changed

+462
-564
lines changed

8 files changed

+462
-564
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.yml

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

eslint.config.mjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 [{
16+
ignores: ["dist/*.js"],
17+
}, ...compat.extends("chartjs"), {
18+
languageOptions: {
19+
globals: {
20+
...globals.browser,
21+
...globals.node,
22+
},
23+
24+
ecmaVersion: 2020,
25+
sourceType: "module",
26+
},
27+
28+
rules: {
29+
complexity: [1, 15],
30+
},
31+
}];

0 commit comments

Comments
 (0)