feat(tslint): added more tslint rules

This commit is contained in:
Torkel Ödegaard
2016-01-13 21:07:57 +01:00
parent 534bc83173
commit 59c928acc2
20 changed files with 135 additions and 95 deletions

View File

@@ -4,11 +4,6 @@ import _ from 'lodash';
import moment from 'moment';
var units = ['y', 'M', 'w', 'd', 'h', 'm', 's'];
var unitsAsc = _.sortBy(units, function (unit) {
return moment.duration(1, unit).valueOf();
});
var unitsDesc = unitsAsc.reverse();
export function parse(text, roundUp?) {
if (!text) { return undefined; }
@@ -104,8 +99,7 @@ export function parseDateMath(mathString, time, roundUp?) {
if (type === 0) {
if (roundUp) {
dateTime.endOf(unit);
}
else {
} else {
dateTime.startOf(unit);
}
} else if (type === 1) {