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

@ -7,12 +7,11 @@ const { Logger } = require('lib/logger.js');
const EventEmitter = require('events');
class DecryptionWorker {
constructor() {
this.state_ = 'idle';
this.logger_ = new Logger();
this.dispatch = (action) => {
this.dispatch = action => {
//console.warn('DecryptionWorker.dispatch is not defined');
};
@ -158,8 +157,8 @@ class DecryptionWorker {
const clearDecryptionCounter = async () => {
await this.kvStore().deleteValue(counterKey);
}
};
// Don't log in production as it results in many messages when importing many items
// this.logger().debug('DecryptionWorker: decrypting: ' + item.id + ' (' + ItemClass.tableName() + ')');
try {
@ -177,7 +176,7 @@ class DecryptionWorker {
if (decryptedItem.type_ === Resource.modelType() && !!decryptedItem.encryption_blob_encrypted) {
// itemsThatNeedDecryption() will return the resource again if the blob has not been decrypted,
// but that will result in an infinite loop if the blob simply has not been downloaded yet.
// So skip the ID for now, and the service will try to decrypt the blob again the next time.
// So skip the ID for now, and the service will try to decrypt the blob again the next time.
excludedIds.push(decryptedItem.id);
}
@ -242,7 +241,6 @@ class DecryptionWorker {
this.scheduleStart();
}
}
}
module.exports = DecryptionWorker;
module.exports = DecryptionWorker;