@@ -72,7 +72,9 @@ async function runESLint({
7272 // PATH A - user supplied explicit globs
7373 if ( explicitGlobs ?. length ) {
7474 logger . info ( 'Linting with explicit patterns:' ) ;
75- explicitGlobs . forEach ( ( g ) => logger . info ( ' ' + g ) ) ;
75+ explicitGlobs . forEach ( ( pattern ) => {
76+ logger . info ( `Linting: ${ pattern } ` ) ;
77+ } ) ;
7678
7779 const eslint = new ESLint ( {
7880 overrideConfigFile : configPath || defaultConfigPath ,
@@ -93,12 +95,14 @@ async function runESLint({
9395 const { forceInclude, tsconfigPaths } = lintConfig . domains . eslint ;
9496
9597 if ( tsconfigPaths . length === 0 ) {
96- logger . error ( '[matrixai-lint] ⚠ No tsconfig.json files found.' ) ;
98+ logger . error ( '[matrixai-lint] ⚠ No tsconfig.json files found.' ) ;
9799 return true ;
98100 }
99101
100102 logger . info ( `Found ${ tsconfigPaths . length } tsconfig.json files:` ) ;
101- tsconfigPaths . forEach ( ( p ) => logger . info ( ' ' + p ) ) ;
103+ tsconfigPaths . forEach ( ( tsconfigPath ) => {
104+ logger . info ( `Using tsconfig: ${ tsconfigPath } ` ) ;
105+ } ) ;
102106
103107 const { files : patterns , ignore : ignorePats } = buildPatterns (
104108 tsconfigPaths ,
@@ -109,13 +113,15 @@ async function runESLint({
109113
110114 if ( patterns . length === 0 ) {
111115 logger . warn (
112- '[matrixai-lint] ⚠ No ESLint targets were derived from configured tsconfig paths.' ,
116+ '[matrixai-lint] ⚠ No ESLint targets were derived from configured tsconfig paths.' ,
113117 ) ;
114118 return false ;
115119 }
116120
117121 logger . info ( 'Linting files:' ) ;
118- patterns . forEach ( ( p ) => logger . info ( ' ' + p ) ) ;
122+ patterns . forEach ( ( pattern ) => {
123+ logger . info ( `Linting: ${ pattern } ` ) ;
124+ } ) ;
119125
120126 const eslint = new ESLint ( {
121127 overrideConfigFile : configPath || defaultConfigPath ,
@@ -144,9 +150,28 @@ async function lintAndReport(
144150 await ESLint . outputFixes ( results ) ;
145151 }
146152
153+ const errorCount = results . reduce (
154+ ( sum , result ) => sum + result . errorCount ,
155+ 0 ,
156+ ) ;
157+ const warningCount = results . reduce (
158+ ( sum , result ) => sum + result . warningCount ,
159+ 0 ,
160+ ) ;
161+ logger . info (
162+ `ESLint summary: files=${ results . length } errors=${ errorCount } warnings=${ warningCount } fix=${ fix ? 'on' : 'off' } ` ,
163+ ) ;
164+
147165 const formatter = await eslint . loadFormatter ( 'stylish' ) ;
148- logger . info ( formatter . format ( results ) ) ;
149- const hasErrors = results . some ( ( r ) => r . errorCount > 0 ) ;
166+ const formattedOutput = await formatter . format ( results ) ;
167+ for ( const line of formattedOutput . split ( / \r ? \n / ) ) {
168+ const normalizedLine = line . trim ( ) ;
169+ if ( normalizedLine . length > 0 ) {
170+ logger . info ( `ESLint detail: ${ normalizedLine } ` ) ;
171+ }
172+ }
173+
174+ const hasErrors = errorCount > 0 ;
150175
151176 return hasErrors ;
152177}
0 commit comments