File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -335,22 +335,28 @@ const lintFoldStart = async () => { if (fold.isTravis()) console.log(fold.start(
335335const lintFoldEnd = async ( ) => { if ( fold . isTravis ( ) ) console . log ( fold . end ( "lint" ) ) ; } ;
336336const eslint = ( folder ) => async ( ) => {
337337 const ESLINTRC_CI = ".eslintrc.ci.json" ;
338- const ESLINTRC = ".eslintrc.json" ;
339338 const isCIEnv = cmdLineOptions . ci || process . env . CI === "true" ;
340- const config = isCIEnv && fs . existsSync ( path . resolve ( folder , ESLINTRC_CI ) ) ? ESLINTRC_CI : ESLINTRC ;
341339
342340 const args = [
343341 "node_modules/eslint/bin/eslint" ,
344- "--config" , `${ folder } /${ config } ` ,
345342 "--format" , "autolinkable-stylish" ,
346343 "--rulesdir" , "scripts/eslint/built/rules" ,
347- "--ext" , ".ts" , folder ,
344+ "--ext" , ".ts" ,
348345 ] ;
349346
347+ if (
348+ isCIEnv &&
349+ fs . existsSync ( path . resolve ( folder , ESLINTRC_CI ) )
350+ ) {
351+ args . push ( "--config" , path . resolve ( folder , ESLINTRC_CI ) ) ;
352+ }
353+
350354 if ( cmdLineOptions . fix ) {
351355 args . push ( "--fix" ) ;
352356 }
353357
358+ args . push ( folder ) ;
359+
354360 log ( `Linting: ${ args . join ( " " ) } ` ) ;
355361 return exec ( process . execPath , args ) ;
356362}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments