@@ -4,7 +4,7 @@ import { outDir } from '@sourceacademy/modules-repotools/getGitRoot';
44import { resolveEitherBundleOrTab } from '@sourceacademy/modules-repotools/manifest' ;
55import { divideAndRound } from '@sourceacademy/modules-repotools/utils' ;
66import chalk from 'chalk' ;
7- import type { ESLint } from 'eslint' ;
7+ import { ESLint } from 'eslint' ;
88import { runPrebuild } from '../prebuild/index.js' ;
99import { formatLintResult , lintGlobal , runEslint } from '../prebuild/lint.js' ;
1010import { formatTscResult , runTsc } from '../prebuild/tsc.js' ;
@@ -53,7 +53,13 @@ export const getLintCommand = () => new Command('lint')
5353 logCommandErrorAndExit ( resolveResult ) ;
5454 }
5555
56- const result = await runEslint ( resolveResult . asset , opts ) ;
56+ const prefix = chalk . blueBright ( '[lintglobal]' ) ;
57+ console . log ( `${ prefix } ${ chalk . cyanBright ( `Running ESLint v${ ESLint . version } ` ) } ` ) ;
58+ const { asset } = resolveResult ;
59+
60+ console . log ( `${ prefix } ${ chalk . cyanBright ( `Linting ${ asset . name } ${ asset . type } ` ) } ` ) ;
61+
62+ const result = await runEslint ( asset , opts ) ;
5763 console . log ( formatLintResult ( result ) ) ;
5864
5965 switch ( result . severity ) {
@@ -75,6 +81,7 @@ export const getLintGlobalCommand = () => new Command('lintglobal')
7581 . action ( async ( { ci, ...opts } ) => {
7682 const prefix = chalk . blueBright ( '[lintglobal]' ) ;
7783
84+ console . log ( `${ prefix } ${ chalk . cyanBright ( `Running ESLint v${ ESLint . version } ` ) } ` ) ;
7885 console . log ( `${ prefix } ${ chalk . cyanBright ( 'Beginning linting with the following options:' ) } ` ) ;
7986 Object . entries ( opts ) . forEach ( ( [ key , value ] , i ) => {
8087 console . log ( ` ${ i + 1 } . ${ chalk . greenBright ( key ) } : ${ chalk . cyanBright ( value ) } ` ) ;
0 commit comments