File tree 5 files changed +6
-11
lines changed
5 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 41
41
"@commitlint/is-ignored" : " ^8.3.5" ,
42
42
"@commitlint/parse" : " ^8.3.4" ,
43
43
"@commitlint/rules" : " ^8.3.4" ,
44
- "@commitlint/types" : " ^8.3.4" ,
45
- "lodash" : " ^4.17.15"
44
+ "@commitlint/types" : " ^8.3.4"
46
45
}
47
46
}
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import util from 'util';
2
2
import isIgnored from '@commitlint/is-ignored' ;
3
3
import parse from '@commitlint/parse' ;
4
4
import defaultRules from '@commitlint/rules' ;
5
- import toPairs from 'lodash/toPairs' ;
6
5
import { buildCommitMesage } from './commit-message' ;
7
6
import {
8
7
LintRuleConfig ,
@@ -64,7 +63,7 @@ export default async function lint(
64
63
) ;
65
64
}
66
65
67
- const invalid = toPairs ( rulesConfig )
66
+ const invalid = Object . entries ( rulesConfig )
68
67
. map ( ( [ name , config ] ) => {
69
68
if ( ! Array . isArray ( config ) ) {
70
69
return new Error (
@@ -131,7 +130,7 @@ export default async function lint(
131
130
}
132
131
133
132
// Validate against all rules
134
- const results = toPairs ( rulesConfig )
133
+ const results = Object . entries ( rulesConfig )
135
134
. filter ( ( [ , [ level ] ] ) => level > 0 )
136
135
. map ( entry => {
137
136
const [ name , config ] = entry ;
Original file line number Diff line number Diff line change 1
1
import Path from 'path' ;
2
2
3
- import toPairs from 'lodash/toPairs' ;
4
3
import merge from 'lodash/merge' ;
5
4
import mergeWith from 'lodash/mergeWith' ;
6
5
import pick from 'lodash/pick' ;
@@ -94,7 +93,7 @@ export default async function load(
94
93
95
94
const rules = preset . rules ? preset . rules : { } ;
96
95
const qualifiedRules = ( await Promise . all (
97
- toPairs ( rules || { } ) . map ( entry => executeRule < any > ( entry ) )
96
+ Object . entries ( rules || { } ) . map ( entry => executeRule < any > ( entry ) )
98
97
) ) . reduce < QualifiedRules > ( ( registry , item ) => {
99
98
const [ key , value ] = item as any ;
100
99
( registry as any ) [ key ] = value ;
Original file line number Diff line number Diff line change 1
1
import chalk from 'chalk' ;
2
- import toPairs from 'lodash/toPairs' ;
3
2
4
3
export default format ;
5
4
@@ -11,7 +10,7 @@ export default format;
11
10
*/
12
11
function format ( input , debug = false ) {
13
12
const results = debug
14
- ? toPairs ( input ) . reduce ( ( registry , item ) => {
13
+ ? Object . entries ( input || { } ) . reduce ( ( registry , item ) => {
15
14
const [ name , value ] = item ;
16
15
registry [ name ] =
17
16
value === null ? chalk . grey ( `<${ name } >` ) : chalk . bold ( value ) ;
Original file line number Diff line number Diff line change 1
1
import chalk from 'chalk' ;
2
- import toPairs from 'lodash/toPairs' ;
3
2
4
3
/**
5
4
* Get formatted meta hints for configuration
@@ -8,7 +7,7 @@ import toPairs from 'lodash/toPairs';
8
7
*/
9
8
export default function meta ( settings ) {
10
9
return chalk . grey (
11
- toPairs ( settings )
10
+ Object . entries ( settings || { } )
12
11
. filter ( item => item [ 1 ] )
13
12
. map ( item => {
14
13
const [ name , value ] = item ;
You can’t perform that action at this time.
0 commit comments