es-check icon indicating copy to clipboard operation
es-check copied to clipboard

[issue]: terminal pipeline

Open seognil opened this issue 4 years ago โ€ข 0 comments

I run es-check es5 project/**/*.js | grep 'erroring file' multi times in my project

It said:

ES-Check: there were 79 ES version matching errors.
          ยท erroring file: xxxA.js
          ยท erroring file: xxxB.js
          ยท erroring file: xxxC.js

There were always 79 error files in my project, that's ok, but grep erroring file count seems random, sometimes 63, sometimes 47, I just can't tell what all those files are.


Also meet this problem while using it in Node (maybe make an incode requirable version as well?)

exec('es-check es5 myFolder', (err, stdout, stderr) => {
    console.log(err)
});

I check your code

I think this issue may be caused by process.exit... forEach is synchronous but log is not? So it return before log all the items

and don't use logger.error for everything... e.g.

logger.error(`ES-Check: there were no ES version matching errors!  ๐ŸŽ‰`)
// => better
logger.log(`ES-Check: there were no ES version matching errors!  ๐ŸŽ‰`)

seognil avatar May 03 '20 15:05 seognil