Consider the following standard Express function:
if (app.get('env') === 'development') {
app.use(function (err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: err
});
});
}
The following warning is displayed:
'next' is defined but never used. - W098
I know I can disable all warnings, but that's not what I want. What I need is to silence JSHint only for a specific parameter ('next' in the snippet above.)
I haven't seen any clear answers to this seemingly common issue. Any ideas?
Thanks!