@@ -170,9 +170,9 @@ function printResult(lintResult) {
170170
171171 lintResultString = results
172172 . map ( result => {
173- const { file, lineNumber, column, names, description , severity} = result ;
173+ const { file, lineNumber, column, names, severity} = result ;
174174 const columnText = column ? `:${ column } ` : '' ;
175- return `${ file } :${ lineNumber } ${ columnText } ${ severity } ${ names } ${ description } ` ;
175+ return `${ file } :${ lineNumber } ${ columnText } ${ severity } ${ names } ${ result . description } ` ;
176176 } )
177177 . join ( '\n' ) ;
178178 }
@@ -281,10 +281,10 @@ if (existsSync(ignorePath)) {
281281 ignoreFilter = fileInfo => ! ignoreInstance . ignores ( fileInfo . relative ) ;
282282}
283283
284- const files = prepareFileList ( program . args , [ 'md' , 'markdown' ] ) . filter ( value => ignoreFilter ( value ) ) ;
285- const ignores = prepareFileList ( options . ignore , null , files ) ;
284+ const inputs = prepareFileList ( program . args , [ 'md' , 'markdown' ] ) . filter ( value => ignoreFilter ( value ) ) ;
285+ const ignores = prepareFileList ( options . ignore , null , inputs ) ;
286286const customRules = loadCustomRules ( options . rules ) ;
287- const diff = files . filter ( file => ignores . every ( ignore => ignore . absolute !== file . absolute ) ) . map ( paths => paths . original ) ;
287+ const diff = inputs . filter ( file => ignores . every ( ignore => ignore . absolute !== file . absolute ) ) . map ( paths => paths . original ) ;
288288
289289function lintAndPrint ( stdin , files ) {
290290 files ||= [ ] ;
@@ -334,9 +334,9 @@ function lintAndPrint(stdin, files) {
334334}
335335
336336try {
337- if ( files . length > 0 && ! options . stdin ) {
337+ if ( inputs . length > 0 && ! options . stdin ) {
338338 lintAndPrint ( null , diff ) ;
339- } else if ( files . length === 0 && options . stdin && ! options . fix ) {
339+ } else if ( inputs . length === 0 && options . stdin && ! options . fix ) {
340340 import ( 'node:stream/consumers' ) . then ( module => module . text ( process . stdin ) ) . then ( lintAndPrint ) ;
341341 } else {
342342 program . help ( ) ;
0 commit comments