File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ import type {
77 TypedFlatConfigItem ,
88} from '../types'
99
10+ // Hold the reference so we don't redeclare the plugin on each call
11+ let _pluginTest : any
12+
1013export async function test (
1114 options : OptionsFiles & OptionsIsInEditor & OptionsOverrides = { } ,
1215) : Promise < TypedFlatConfigItem [ ] > {
@@ -18,18 +21,20 @@ export async function test(
1821 interopDefault ( import ( 'eslint-plugin-no-only-tests' ) ) ,
1922 ] as const )
2023
24+ _pluginTest = _pluginTest || {
25+ ...pluginVitest ,
26+ rules : {
27+ ...pluginVitest . rules ,
28+ // extend `test/no-only-tests` rule
29+ ...pluginNoOnlyTests . rules ,
30+ } ,
31+ }
32+
2133 return [
2234 {
2335 name : 'coderwyd/test/setup' ,
2436 plugins : {
25- test : {
26- ...pluginVitest ,
27- rules : {
28- ...pluginVitest . rules ,
29- // extend `test/no-only-tests` rule
30- ...pluginNoOnlyTests . rules ,
31- } ,
32- } ,
37+ test : _pluginTest ,
3338 } ,
3439 } ,
3540 {
You can’t perform that action at this time.
0 commit comments