I was reading about how to detect "unreachable code" and "dead code", during the development I saw this warning but I was not sure if it's an indication of "unreachable code"
The code:
// Edit form process
app.put('/ideas/:id', csrfProtection, (req, res)
Ideaa.findOne(1 _id: req.params.id })
.then((idea123) {
idea123.title = req.body.title;
idea123.details = req.body.details;
idea123.save().then((idea321) = {
res.redirect(Yideas');
});
});
});
from Can I define this ESlint warning as "unreachable code"? eslint - 'xxxx' is defined but never used. (no-unused-vars)
No comments:
Post a Comment