Skip to content

Commit cf3a386

Browse files
committed
Use eslint defineConfig
1 parent 25329d1 commit cf3a386

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

eslint.config.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import eslintPluginVitest from '@vitest/eslint-plugin';
55
import eslintPluginJsdoc from 'eslint-plugin-jsdoc';
66
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
77
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
8+
import { defineConfig } from 'eslint/config';
89
import { dirname, resolve } from 'node:path';
910
import { fileURLToPath } from 'node:url';
1011
import tseslint from 'typescript-eslint';
@@ -13,7 +14,7 @@ const __filename: string = fileURLToPath(import.meta.url);
1314
const __dirname: string = dirname(__filename);
1415
const gitignorePath: string = resolve(__dirname, '.gitignore');
1516

16-
const config: ReturnType<typeof tseslint.config> = tseslint.config(
17+
export default defineConfig([
1718
//#region global
1819
includeIgnoreFile(gitignorePath),
1920
{
@@ -129,7 +130,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
129130
//#endregion
130131

131132
//#region unicorn
132-
eslintPluginUnicorn.configs['flat/recommended'],
133+
eslintPluginUnicorn.configs.recommended,
133134
{
134135
rules: {
135136
'unicorn/consistent-destructuring': 'off',
@@ -234,6 +235,4 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
234235
},
235236
},
236237
//#endregion
237-
);
238-
239-
export default config;
238+
]);

0 commit comments

Comments
 (0)