Skip to content

Commit bb03d6a

Browse files
committed
Update ESLint config with config helpers
1 parent ead9aff commit bb03d6a

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

eslint.config.js

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1+
import { defineConfig, globalIgnores } from "eslint/config";
12
import eslint from "@eslint/js";
23
import simpleImportSort from "eslint-plugin-simple-import-sort";
34
import globals from "globals";
45
import tsEslint from "typescript-eslint";
56

67
const __dirname = import.meta.dirname;
78

8-
/** @type {import("eslint").Linter.Config[]} */
9-
export default [
9+
export default defineConfig([
1010
{
1111
plugins: {
1212
"@typescript-eslint": tsEslint.plugin,
1313
"simple-import-sort": simpleImportSort,
1414
},
1515
},
16-
{
17-
ignores: [
18-
"dist",
19-
"_site",
20-
"eslint.config.js",
21-
".prettierrc.js",
22-
"src/temporal.d.ts",
23-
],
24-
},
16+
globalIgnores([
17+
"dist",
18+
"_site",
19+
"eslint.config.js",
20+
".prettierrc.js",
21+
"src/temporal.d.ts",
22+
]),
2523
{
2624
languageOptions: {
2725
parser: tsEslint.parser,
@@ -33,8 +31,8 @@ export default [
3331
},
3432
},
3533
eslint.configs.recommended,
36-
...tsEslint.configs.strictTypeChecked,
37-
...tsEslint.configs.stylisticTypeChecked,
34+
tsEslint.configs.strictTypeChecked,
35+
tsEslint.configs.stylisticTypeChecked,
3836
{
3937
rules: {
4038
camelcase: "error",
@@ -84,4 +82,4 @@ export default [
8482
],
8583
},
8684
},
87-
];
85+
]);

0 commit comments

Comments
 (0)