@@ -21,13 +21,9 @@ export function getPatterns() {
21
21
const entries = patterns ;
22
22
for ( const [ language , { tests } ] of Object . entries ( clientConfig ) ) {
23
23
entries . unshift ( `tests/output/${ language } /${ tests . outputFolder } /client/**` ) ;
24
- entries . unshift (
25
- `tests/output/${ language } /${ tests . outputFolder } /requests/**` ,
26
- ) ;
24
+ entries . unshift ( `tests/output/${ language } /${ tests . outputFolder } /requests/**` ) ;
27
25
entries . unshift ( `tests/output/${ language } /${ tests . outputFolder } /e2e/**` ) ;
28
- entries . unshift (
29
- `tests/output/${ language } /${ tests . outputFolder } /benchmark/**` ,
30
- ) ;
26
+ entries . unshift ( `tests/output/${ language } /${ tests . outputFolder } /benchmark/**` ) ;
31
27
}
32
28
return entries ;
33
29
}
@@ -38,9 +34,7 @@ async function preCommit(log) {
38
34
await run ( 'git merge HEAD' ) ;
39
35
} catch ( e ) {
40
36
if ( e . exitCode === 128 ) {
41
- console . log (
42
- 'Skipping the pre-commit check because a merge is in progress' ,
43
- ) ;
37
+ console . log ( 'Skipping the pre-commit check because a merge is in progress' ) ;
44
38
return ;
45
39
}
46
40
}
@@ -50,13 +44,7 @@ async function preCommit(log) {
50
44
const toUnstage = micromatch . match ( stagedFiles , getPatterns ( ) ) ;
51
45
52
46
// the snippets and guides are yarn workspaces, so the yarn.lock file can change when they are updated, but the CI will take care of it
53
- if (
54
- (
55
- await run (
56
- 'git diff --name-only --cached -- {guides,snippet}/javascript | wc -l' ,
57
- )
58
- ) . trim ( ) !== '0'
59
- ) {
47
+ if ( ( await run ( 'git diff --name-only --cached -- {guides,snippet}/javascript | wc -l' ) ) . trim ( ) !== '0' ) {
60
48
toUnstage . push ( 'yarn.lock' ) ;
61
49
}
62
50
@@ -66,10 +54,7 @@ async function preCommit(log) {
66
54
67
55
if ( log ) {
68
56
toUnstage . forEach ( ( file ) =>
69
- console . log (
70
- chalk . black . bgYellow ( '[INFO]' ) ,
71
- `Generated file found, unstaging: ${ file } ` ,
72
- ) ,
57
+ console . log ( chalk . black . bgYellow ( '[INFO]' ) , `Generated file found, unstaging: ${ file } ` ) ,
73
58
) ;
74
59
}
75
60
await run ( `git restore --staged ${ toUnstage . join ( ' ' ) } ` ) ;
0 commit comments