ESlint no-plusplus

and no-empty, space-unary-ops
This commit is contained in:
Peter Jaszkowiak
2017-02-18 01:12:18 -07:00
parent d1101a7fb4
commit 3361a72725
81 changed files with 167 additions and 162 deletions

View File

@@ -151,10 +151,10 @@ describe('Utility Methods', function () {
var currentHour = new Date().getHours();
var hours = utils.getHoursArray();
var index = hours.length - 1;
for (var i = currentHour, ii = currentHour - 24; i > ii; i--) {
for (var i = currentHour, ii = currentHour - 24; i > ii; i -= 1) {
var hour = i < 0 ? 24 + i : i;
assert.equal(hours[index], hour + ':00');
-- index;
index -= 1;
}
done();
});
@@ -164,10 +164,10 @@ describe('Utility Methods', function () {
var days = utils.getDaysArray();
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var index = 0;
for(var x = 29; x >= 0; x--) {
for(var x = 29; x >= 0; x -= 1) {
var tmpDate = new Date(currentDay - (1000 * 60 * 60 * 24 * x));
assert.equal(months[tmpDate.getMonth()] + ' ' + tmpDate.getDate(), days[index]);
++ index;
index += 1;
}
done();
});