Skip to content

Commit

Permalink
refactor: replace lodash/omit with spread (#988)
Browse files Browse the repository at this point in the history
  • Loading branch information
armano2 committed Feb 10, 2020
1 parent d5c601f commit f379dcc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions @commitlint/resolve-extends/src/index.ts
Expand Up @@ -4,7 +4,6 @@ import 'resolve-global';
import resolveFrom from 'resolve-from';
import merge from 'lodash/merge';
import mergeWith from 'lodash/mergeWith';
import omit from 'lodash/omit';

const importFresh = require('import-fresh');

Expand Down Expand Up @@ -34,8 +33,8 @@ export default function resolveExtends(
) {
const {extends: e} = config;
const extended = loadExtends(config, context).reduceRight(
(r, c) =>
mergeWith(r, omit(c, 'extends'), (objValue, srcValue) => {
(r, {extends: _, ...c}) =>
mergeWith(r, c, (objValue, srcValue) => {
if (Array.isArray(objValue)) {
return srcValue;
}
Expand Down

0 comments on commit f379dcc

Please sign in to comment.