pgAdmin / eslint-parallel

Tiny eslint wrapper to allow executing javascript linting in parallel.
Apache License 2.0
27 stars 11 forks source link

does not throw exit 1 when lint fails #1

Closed jaggs6 closed 6 years ago

jaggs6 commented 7 years ago

tried npm run lint and it returns exit code 0 when eslint fails

alansouzati commented 7 years ago

let me look into this. sorry for taking such a long time to look into this.

mmmmmmaya commented 6 years ago

Hello! Has any progress been made on this issue? I would really like to use this eslint wrapper, but exit code is a deal breaker for me. Let me know if there's anything I can do to help!

alansouzati commented 6 years ago

Sorry I got really busy with Grommet stuff (I still am), but let me set some time aside to look into this today! Thanks for reminding me about this.

alansouzati commented 6 years ago

I think I had to much beer when I created this library, the problem seems to be when there is only one error.

https://github.com/alansouzati/eslint-parallel/blob/master/src/cli.js#L47

This check

const failed = result.errorCount > 1 || result.warningCount > 1;

is wrong.

It should be

const failed = result.errorCount || result.warningCount;

Sorry about this rookie mistake. Let me release a new version with a fix for this.

alansouzati commented 6 years ago

Fixed in https://github.com/alansouzati/eslint-parallel/commit/7a8b29d58ac07081399257d3fff7dc9bc51a6508.

released 0.3.2 with this fix included