@@ -26,7 +26,10 @@ const loadPlugin = test.macro<[keyof typeof versions]>({
2626 * configuration.
2727 */
2828 await t . notThrowsAsync (
29- versions [ version ] . load ( { plugins : [ plugin ] } , { file : 'package.json' } ) ,
29+ versions [ version ] . load (
30+ { plugins : [ plugin as unknown as any ] } ,
31+ { file : 'package.json' } ,
32+ ) ,
3033 ) ;
3134 } ,
3235 title ( _ , version ) {
@@ -37,6 +40,10 @@ const loadPlugin = test.macro<[keyof typeof versions]>({
3740test ( loadPlugin , '19.x' ) ;
3841test ( loadPlugin , '20.x' ) ;
3942
43+ test ( '@commitlint/load@19.xx can load the plugin' , async ( t ) => {
44+ await t . notThrowsAsync ( load20x ( { plugins : [ plugin ] } , { file : 'package.json' } ) ) ;
45+ } ) ;
46+
4047/**
4148 * The type of the `RulesConfig` have changed in [commitlint v20.3.1](
4249 * https://github.com/conventional-changelog/commitlint/releases/tag/v20.3.1),
@@ -72,7 +79,8 @@ const lintUsingPluginRules = test.macro<[keyof typeof versions]>({
7279 : ( ) => config . ruleOutcome ,
7380 ] ,
7481 } as unknown as any ,
75- { plugins : { 'function-rules' : plugin } } ,
82+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
83+ { plugins : { 'function-rules' : plugin as unknown as any } } ,
7684 ) ;
7785
7886 const message = `rule "${ rule } " can't be used by commitlint` ;
0 commit comments