question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to exit with success even if there are errors

See original GitHub issue

Hi, we are using the eslint CLI together with npm for running eslint from the command line.

So far so good, apart that we’re also using parallelshell to run commands in parallel. The problem is, parallelshell kills all the running processes if one of them returns an exit status that’s not 0.

We managed to work around this by exiting manually:

eslint source ; exit 0

But since it’s quite ugly, is it possible to add an option to exit with 0 even on errors (like if they were just warnings)?

Thanks!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:18
  • Comments:37 (28 by maintainers)

github_iconTop GitHub Comments

18reactions
nzakascommented, Jan 8, 2016

I’m sorry, we decided not to pursue this any further. As I mentioned in my last comment, we recommend wrapping ESLint in something else if you want more control over exit codes.

11reactions
timfishcommented, Jan 14, 2017

tslint has:

--force     return status code 0 even if there are lint errors

I’m pretty sure tslint also lints JavaScript now…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Exit When Errors Occur in Bash Scripts - Intoli
A short guide to exiting when errors occur in your bash scripts.
Read more >
Automatic exit from Bash shell script on error - Stack Overflow
Another option is to use the set -e command at the top of your script - it will make the script exit if...
Read more >
Chapter 6. Exit and Exit Status
A successful command returns a 0, while an unsuccessful one returns a non-zero value that usually can be interpreted as an error code....
Read more >
Bash command line exit codes demystified | Enable Sysadmin
An exit code is a system response that reports success, an error, or another condition that provides a clue about what caused an...
Read more >
How can I get this script to error exit based on result of for loop?
If your script is exiting because of an error condition, you should call exit 1 . That does not affect errexit at all....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found