File tree Expand file tree Collapse file tree 5 files changed +6
-11
lines changed Expand file tree Collapse file tree 5 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 4141 "@commitlint/is-ignored" : " ^8.3.5" ,
4242 "@commitlint/parse" : " ^8.3.4" ,
4343 "@commitlint/rules" : " ^8.3.4" ,
44- "@commitlint/types" : " ^8.3.4" ,
45- "lodash" : " ^4.17.15"
44+ "@commitlint/types" : " ^8.3.4"
4645 }
4746}
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import util from 'util';
22import isIgnored from '@commitlint/is-ignored' ;
33import parse from '@commitlint/parse' ;
44import defaultRules from '@commitlint/rules' ;
5- import toPairs from 'lodash/toPairs' ;
65import { buildCommitMesage } from './commit-message' ;
76import {
87 LintRuleConfig ,
@@ -64,7 +63,7 @@ export default async function lint(
6463 ) ;
6564 }
6665
67- const invalid = toPairs ( rulesConfig )
66+ const invalid = Object . entries ( rulesConfig )
6867 . map ( ( [ name , config ] ) => {
6968 if ( ! Array . isArray ( config ) ) {
7069 return new Error (
@@ -131,7 +130,7 @@ export default async function lint(
131130 }
132131
133132 // Validate against all rules
134- const results = toPairs ( rulesConfig )
133+ const results = Object . entries ( rulesConfig )
135134 . filter ( ( [ , [ level ] ] ) => level > 0 )
136135 . map ( entry => {
137136 const [ name , config ] = entry ;
Original file line number Diff line number Diff line change 11import Path from 'path' ;
22
3- import toPairs from 'lodash/toPairs' ;
43import merge from 'lodash/merge' ;
54import mergeWith from 'lodash/mergeWith' ;
65import pick from 'lodash/pick' ;
@@ -94,7 +93,7 @@ export default async function load(
9493
9594 const rules = preset . rules ? preset . rules : { } ;
9695 const qualifiedRules = ( await Promise . all (
97- toPairs ( rules || { } ) . map ( entry => executeRule < any > ( entry ) )
96+ Object . entries ( rules || { } ) . map ( entry => executeRule < any > ( entry ) )
9897 ) ) . reduce < QualifiedRules > ( ( registry , item ) => {
9998 const [ key , value ] = item as any ;
10099 ( registry as any ) [ key ] = value ;
Original file line number Diff line number Diff line change 11import chalk from 'chalk' ;
2- import toPairs from 'lodash/toPairs' ;
32
43export default format ;
54
@@ -11,7 +10,7 @@ export default format;
1110 */
1211function format ( input , debug = false ) {
1312 const results = debug
14- ? toPairs ( input ) . reduce ( ( registry , item ) => {
13+ ? Object . entries ( input || { } ) . reduce ( ( registry , item ) => {
1514 const [ name , value ] = item ;
1615 registry [ name ] =
1716 value === null ? chalk . grey ( `<${ name } >` ) : chalk . bold ( value ) ;
Original file line number Diff line number Diff line change 11import chalk from 'chalk' ;
2- import toPairs from 'lodash/toPairs' ;
32
43/**
54 * Get formatted meta hints for configuration
@@ -8,7 +7,7 @@ import toPairs from 'lodash/toPairs';
87 */
98export default function meta ( settings ) {
109 return chalk . grey (
11- toPairs ( settings )
10+ Object . entries ( settings || { } )
1211 . filter ( item => item [ 1 ] )
1312 . map ( item => {
1413 const [ name , value ] = item ;
You can’t perform that action at this time.
0 commit comments