Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upUnused variable in arrow functions #557
Comments
dcousens
added
the
bug
label
Jun 30, 2016
This comment has been minimized.
This comment has been minimized.
|
This doesn't happen for normal functions either - hasn't for a while now iirc |
This comment has been minimized.
This comment has been minimized.
|
I think it's because express forces you to have four arguments to be able to be an error handler, thus we cannot enforce unused variables when they are function parameters. Relevant: expressjs/express#2896 This is a duplicate of: #419 |
This comment has been minimized.
This comment has been minimized.
Oh wow, that's not a good pattern hey - had no idea they did that edit: looks like maintainers agree and they want to change it; that would unblock reintroducing this behavior for us I reckon |
This comment has been minimized.
This comment has been minimized.
|
Ah true... closing as duplicate of #419 |
dcousens
closed this
Jun 30, 2016
This comment has been minimized.
This comment has been minimized.
|
Yeah, happy to see about reintroducing this rule once there's a solution for all the express users out there (including myself!). |
This comment has been minimized.
This comment has been minimized.
|
Since we are now allowing app.use(function (err, _, __, ___) {
}) |
LinusU
reopened this
Jul 6, 2017
This comment has been minimized.
This comment has been minimized.
|
@feross thoughts? |
This comment has been minimized.
This comment has been minimized.
|
ping @feross |
dcousens commentedJun 30, 2016
•
edited
Example
Expected
unused variable "x", instead got nothing. Intentional?