1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Chore: Apply eslint rules

This commit is contained in:
Laurent Cozic
2019-09-19 22:51:18 +01:00
parent ab29d7e872
commit e648392330
185 changed files with 1196 additions and 1196 deletions

View File

@ -33,7 +33,7 @@ class Time {
}
dateTimeFormat() {
return this.dateFormat() + ' ' + this.timeFormat();
return `${this.dateFormat()} ${this.timeFormat()}`;
}
unix() {
@ -54,19 +54,19 @@ class Time {
unixMsToIso(ms) {
return (
moment
`${moment
.unix(ms / 1000)
.utc()
.format('YYYY-MM-DDTHH:mm:ss.SSS') + 'Z'
.format('YYYY-MM-DDTHH:mm:ss.SSS')}Z`
);
}
unixMsToIsoSec(ms) {
return (
moment
`${moment
.unix(ms / 1000)
.utc()
.format('YYYY-MM-DDTHH:mm:ss') + 'Z'
.format('YYYY-MM-DDTHH:mm:ss')}Z`
);
}
@ -83,7 +83,7 @@ class Time {
if (format === null) format = this.dateTimeFormat();
const m = moment(localDateTime, format);
if (m.isValid()) return m.toDate().getTime();
throw new Error('Invalid input for formatLocalToMs: ' + localDateTime);
throw new Error(`Invalid input for formatLocalToMs: ${localDateTime}`);
}
// Mostly used as a utility function for the DateTime Electron component