Skip to content

Commit 9f9ba2d

Browse files
style: adopt updated eslint rules
1 parent 75259c8 commit 9f9ba2d

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

2018/day-04/guards.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const findSleepiestTimes = (guard, data) => {
4444
const getTimesAsleep = (activity) => {
4545
return activity.split('')
4646
.map((state, idx) => {
47-
return { id: idx, state: state } // parse the activity stream into data
47+
return { id: idx, state } // parse the activity stream into data
4848
}).filter((minute) => minute.state === '#') // get only the times the guard is asleep
4949
.map((minute) => minute.id) // convert into a list of times
5050
}

2018/day-06/coordinates.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ const blankGrid = () => {
7676
grid[x] = grid[x] || []
7777
for (let y = minY; y < maxY; y++) {
7878
grid[x][y] = grid[x][y] || {
79-
x: x,
80-
y: y
79+
x,
80+
y
8181
}
8282
}
8383
}

2018/day-09/marbles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const playGame = (playerCount, highMarble, showBoard) => {
160160

161161
// tally the results
162162
const results = {
163-
players: players,
163+
players,
164164
highScore: players.sort((a, b) => b - a)[0]
165165
}
166166

2018/day-10/solution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const init = (data) => {
2121
const best = beaconTracker.frameMeta.reduce((acc, curr, idx) => {
2222
return (curr.focus < acc.focus)
2323
? {
24-
idx: idx,
24+
idx,
2525
focus: curr.focus,
2626
dims: curr.dims
2727
}

2018/day-11/fuel-cells.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Rack {
9595
findMaxSquare (size) {
9696
return this.cells.reduce((acc, cell, idx) => {
9797
const squarePower = this._tallySquare(idx, size)
98-
return (squarePower !== null && squarePower > acc.power) ? { power: squarePower, idx: idx } : acc
98+
return (squarePower !== null && squarePower > acc.power) ? { power: squarePower, idx } : acc
9999
}, { power: -99999, idx: -1 })
100100
}
101101
}

2018/day-12/plants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Plants {
6363

6464
return {
6565
position: pot.position,
66-
state: state
66+
state
6767
}
6868
})
6969

0 commit comments

Comments
 (0)