Skip to content

Commit 5177c66

Browse files
author
Claire Nord
committed
fun: incorporate decaffeinate suggestions
1 parent e46175b commit 5177c66

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

scripts/fun.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
//
44
// Author:
55
// anishathalye
6-
/*
7-
* decaffeinate suggestions:
8-
* DS102: Remove unnecessary code created because of implicit returns
9-
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
10-
*/
11-
126

137
module.exports = (robot) => {
148
robot.hear(/\s?#dev\b/, (res) => res.send('Did you mean #anish-talks-into-void?'));
@@ -68,7 +62,7 @@ module.exports = (robot) => {
6862
setTimeout(sendFrom, lennySnakeTick, i + 1);
6963
}
7064
};
71-
return sendFrom(0);
65+
sendFrom(0);
7266
});
7367

7468
robot.hear(/jason/i, (res) => {
@@ -220,7 +214,7 @@ thank mr skeltal
220214

221215
robot.respond(/correct (.*)/, (res) => {
222216
const msg = res.match[1];
223-
return res.send(msg.replace(/[aeiou]/gi, ''));
217+
res.send(msg.replace(/[aeiou]/gi, ''));
224218
});
225219

226220
const selfDestructSequence = [
@@ -240,13 +234,13 @@ thank mr skeltal
240234

241235
const selfDestructTick = 1000; // milliseconds
242236

243-
return robot.respond(/selfdestruct/i, (res) => {
237+
robot.respond(/selfdestruct/i, (res) => {
244238
const sendFrom = (i) => {
245239
if (i < selfDestructSequence.length) {
246240
res.send(selfDestructSequence[i]);
247241
setTimeout(sendFrom, selfDestructTick, i + 1);
248242
}
249243
};
250-
return sendFrom(0);
244+
sendFrom(0);
251245
});
252246
};

0 commit comments

Comments
 (0)