File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,11 @@ rules:
119
119
import/exports-last : off
120
120
import/no-duplicates : error
121
121
import/no-namespace : error
122
- import/extensions : [error, never] # TODO: switch to ignorePackages
122
+ import/extensions :
123
+ - error
124
+ - ignorePackages
125
+ - ts : never # TODO: remove once TS supports extensions
126
+ js : never # TODO: remove
123
127
import/order : [error, { newlines-between: always-and-inside-groups }]
124
128
import/newline-after-import : error
125
129
import/prefer-default-export : off
Original file line number Diff line number Diff line change 2
2
3
3
const fs = require ( 'fs' ) ;
4
4
const path = require ( 'path' ) ;
5
+ const childProcess = require ( 'child_process' ) ;
6
+
7
+ function exec ( command , options ) {
8
+ const output = childProcess . execSync ( command , {
9
+ maxBuffer : 10 * 1024 * 1024 , // 10MB
10
+ encoding : 'utf-8' ,
11
+ ...options ,
12
+ } ) ;
13
+ return output && output . trimEnd ( ) ;
14
+ }
5
15
6
16
function readdirRecursive ( dirPath , opts = { } ) {
7
17
const { ignoreDir } = opts ;
@@ -71,6 +81,7 @@ function showDirStats(dirPath) {
71
81
}
72
82
73
83
module . exports = {
84
+ exec,
74
85
readdirRecursive,
75
86
showDirStats,
76
87
} ;
You can’t perform that action at this time.
0 commit comments