Skip to content

Commit 415226c

Browse files
committed
Fixing lint errors
1 parent f0ddbe1 commit 415226c

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

app.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ function logScanned(uuid, fixture) {
2323
allScans.unshift({ time: now, status: 'missing', uuid });
2424
return;
2525
}
26-
allScans.map(item => item.status = (item.uuid === uuid) ? 'fixed' : item.status);
26+
allScans.map((item) => {
27+
const itm = item;
28+
itm.status = (itm.uuid === uuid) ? 'fixed' : itm.status;
29+
return itm;
30+
});
2731
allScans.unshift({ time: now, fixture, uuid });
2832
}
2933

@@ -50,7 +54,11 @@ app.get('/qrlist', (req, res) => {
5054
.filter(item => item.uuid !== '')
5155
.filter(item => item.uuid !== undefined)
5256
.sort((a, b) => (a.floor === b.floor ? 0 : +(a.floor > b.floor) || -1));
53-
qrList.forEach(item => item.qr = qr.imageSync('http://url.coderbunker.com/' + item.uuid, { type: 'svg' }));
57+
qrList.forEach((item) => {
58+
const itm = item;
59+
itm.qr = qr.imageSync(`http://url.coderbunker.com/${itm.uuid}`, { type: 'svg' });
60+
return itm;
61+
});
5462
res.render('qrList', { matches: qrList });
5563
});
5664
});

googleSpreadsheet.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,16 @@ function searchDatabase(query, rows) {
3434
return matches;
3535
}
3636

37-
function addSimilarItems(obj, allObj) {
37+
function addSimilarItems(object, allObj) {
38+
const obj = object;
3839
obj.similarItems = searchDatabase({ fixture: obj.fixture }, allObj)
3940
.filter(item => item.uuid !== obj.uuid)
4041
.splice(0, 3);
4142
return obj;
4243
}
4344

44-
function addMarkdown(obj) {
45+
function addMarkdown(object) {
46+
const obj = object;
4547
obj.HOWTO = marked(obj.HOWTO);
4648
obj.details = marked(obj.details);
4749
obj.Troubleshooting = marked(obj.Troubleshooting);

0 commit comments

Comments
 (0)