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

First pass at linting lib dir

This commit is contained in:
Laurent Cozic
2019-07-29 15:43:53 +02:00
parent 64b7bc3d62
commit 86dc72b204
170 changed files with 4140 additions and 3119 deletions

View File

@ -1,7 +1,6 @@
const EncryptionService = require('lib/services/EncryptionService.js');
class BaseSyncTarget {
constructor(db, options = null) {
this.db_ = db;
this.synchronizer_ = null;
@ -19,7 +18,7 @@ class BaseSyncTarget {
}
option(name, defaultValue = null) {
return this.options_ && (name in this.options_) ? this.options_[name] : defaultValue;
return this.options_ && name in this.options_ ? this.options_[name] : defaultValue;
}
logger() {
@ -117,13 +116,12 @@ class BaseSyncTarget {
async syncStarted() {
if (!this.synchronizer_) return false;
if (!await this.isAuthenticated()) return false;
if (!(await this.isAuthenticated())) return false;
const sync = await this.synchronizer();
return sync.state() != 'idle';
}
}
BaseSyncTarget.dispatch = (action) => {};
BaseSyncTarget.dispatch = action => {};
module.exports = BaseSyncTarget;
module.exports = BaseSyncTarget;