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:
119119 import/exports-last : off
120120 import/no-duplicates : error
121121 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
123127 import/order : [error, { newlines-between: always-and-inside-groups }]
124128 import/newline-after-import : error
125129 import/prefer-default-export : off
Original file line number Diff line number Diff line change 22
33const fs = require ( 'fs' ) ;
44const 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+ }
515
616function readdirRecursive ( dirPath , opts = { } ) {
717 const { ignoreDir } = opts ;
@@ -71,6 +81,7 @@ function showDirStats(dirPath) {
7181}
7282
7383module . exports = {
84+ exec,
7485 readdirRecursive,
7586 showDirStats,
7687} ;
You can’t perform that action at this time.
0 commit comments