Use shorthand property syntax for object literals JS-0240
Anti-pattern
Minor
7 months ago3 years old
Expected property shorthand
1456  const id = req.params.id;
1457
1458  Tutorial.destroy({
1459    where: { id: id },1460  })
1461    .then((num) => {
1462      if (num == 1) {
Expected property shorthand
1431    where: { id: id },
1432
1433    //exclude id when updating
1434    fields: fields,1435  })
1436    .then((num) => {
1437      if (num == 1) {
Expected property shorthand
1428
1429  Tutorial.update(req.body, {
1430    //exclude id when updating
1431    where: { id: id },1432
1433    //exclude id when updating
1434    fields: fields,
Expected property shorthand
1135        var resPoints = geojsonobj.parse(forPlot, { Point: ["lon", "lat"] });
1136        var resLines = lines;
1137
1138        resdata = { resPoints: resPoints, resLines: resLines };1139        res.send(resdata);
1140      })
1141      .catch((err) => {
Expected property shorthand
1135        var resPoints = geojsonobj.parse(forPlot, { Point: ["lon", "lat"] });
1136        var resLines = lines;
1137
1138        resdata = { resPoints: resPoints, resLines: resLines };1139        res.send(resdata);
1140      })
1141      .catch((err) => {