Skip to content

Commit f35b1c6

Browse files
committed
fix: correct order of merging plugins
1 parent c5663fa commit f35b1c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

@commitlint/resolve-extends/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ test('plugins should be merged correctly', () => {
370370

371371
const expected = {
372372
extends: ['extender-name'],
373-
plugins: ['test', 'test2', 'test3'],
373+
plugins: ['test3', 'test2', 'test'],
374374
zero: 'root',
375375
};
376376

@commitlint/resolve-extends/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function resolveExtends(
3838
mergeWith(r, c, (objValue, srcValue, key) => {
3939
if (key === 'plugins') {
4040
if (Array.isArray(objValue)) {
41-
return srcValue.concat(objValue);
41+
return objValue.concat(srcValue);
4242
}
4343
} else if (Array.isArray(objValue)) {
4444
return srcValue;

0 commit comments

Comments
 (0)