Skip to content

Commit 38a56fa

Browse files
committed
✅ Use real config presets in ESLint loading test
1 parent 0f6fb96 commit 38a56fa

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/__tests__/entrypoint.test.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ESLint } from 'eslint';
44
import { expect, test } from 'vitest';
55
import plugin, { type Plugin } from '../index';
66
import * as noHookMemo from '../rules/no-hook-memo/no-hook-memo.rule';
7+
import { defineConfig } from 'eslint/config';
78

89
test('plugin can be loaded by ESLint', async () => {
910
// Verify the plugin has expected structure
@@ -17,13 +18,10 @@ test('plugin can be loaded by ESLint', async () => {
1718
plugins: {
1819
'react-no-manual-memo': plugin satisfies Plugin as any,
1920
},
20-
baseConfig: [
21-
{
22-
rules: {
23-
'react-no-manual-memo/no-hook-memo': 'error',
24-
},
25-
}
26-
]
21+
baseConfig: defineConfig([
22+
plugin.configs['flat/all'],
23+
plugin.configs['flat/recommended'],
24+
]),
2725
}
2826
);
2927

0 commit comments

Comments
 (0)