-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error handler doesn't work if I remove next parameter #3715
Comments
This is correct behavior. You may need to configure your eslint to work better with Express.js code. We recommend StandardJS or one of it's derritives. You can read more about how error handling works in Express and why the next argument is important here: http://expressjs.com/en/guide/error-handling.html |
@frederikhors you can add this line right above the line with the |
@niftylettuce thanks. I dropped out eslint for StandardJS. |
@niftylettuce but still I think something is not elegant in this way... |
Yeah, I agree on it not being super elegant, and would personally like to see it changed in 5.x, there is an open issue about this here: #2896 |
Also I have a proposed fix for this in this comment: pillarjs/router#59 (comment) If anyone has feedback I would appreciate it. I am willing to put together the final PR for that if people are happy with the approach, but I have been waiting on feedback to that post. |
I'm learning
Express.js
and using the generator I generated a new app with:After that I saw in
app.js
that there is this code:As you can see in the image
eslint
is complaining aboutnext
parameter, declared and never used. I agree, but if I remove itexpress
doesn't render the error page.Why this behavior?
This is dangerous for me because I can't trust anymore eslint or my coding degree? I'm surely missing something. But what?
The text was updated successfully, but these errors were encountered: