@@ -53,7 +53,16 @@ if (flags.debug) {
5353}
5454const cacheLinters = ! flags . debug ;
5555
56+ function debugLogging ( ...args ) {
57+ if ( ! flags . debug ) {
58+ return ;
59+ }
60+
61+ console . log ( ...args ) ;
62+ }
63+
5664async function runESLint ( scriptFiles ) {
65+ debugLogging ( '[lint]: Running EsLint...' ) ;
5766 const cli = new ESLint ( {
5867 cwd : join ( import . meta. dirname , '..' , '..' ) ,
5968 fix : flags . fix ,
@@ -111,6 +120,7 @@ async function runESLint(scriptFiles) {
111120}
112121
113122async function runStylelint ( files ) {
123+ debugLogging ( '[lint]: Running StyleLint...' ) ;
114124 const { report, errored } = await stylelint . lint ( {
115125 configFile : join ( import . meta. dirname , '..' , '..' , '.stylelintrc.json' ) ,
116126 ignorePath : join ( import . meta. dirname , '..' , '..' , '.stylelintignore' ) ,
@@ -137,6 +147,8 @@ async function runStylelint(files) {
137147 * @param {string[] } files the input files to analyze.
138148 */
139149async function runLitAnalyzer ( files ) {
150+ debugLogging ( '[lint]: Running LitAnalyzer...' ) ;
151+
140152 const readLitAnalyzerConfigFromCompilerOptions = ( ) => {
141153 const { compilerOptions } = JSON . parse (
142154 readFileSync ( tsconfigJsonPath ( ) , 'utf-8' ) ,
@@ -154,6 +166,11 @@ async function runLitAnalyzer(files) {
154166 } ;
155167
156168 const { rules } = readLitAnalyzerConfigFromCompilerOptions ( ) ;
169+ /**
170+ *
171+ * @param {string[] } subsetFiles
172+ * @returns {{output: string, error: string, status:boolean} }
173+ */
157174 const getLitAnalyzerResult = async subsetFiles => {
158175 const args = [
159176 litAnalyzerExecutablePath ( ) ,
@@ -217,7 +234,9 @@ async function runLitAnalyzer(files) {
217234 } ) ,
218235 ) ;
219236 for ( const result of results ) {
220- if ( result . output ) {
237+ // Don't print if no problems are found
238+ // Mimics the other tools
239+ if ( result . output && ! result . output . includes ( 'Found 0 problems' ) ) {
221240 console . log ( result . output ) ;
222241 }
223242 if ( result . error ) {
0 commit comments