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

@ -5,7 +5,7 @@ const FsDriverBase = require('lib/fs-driver-base');
class FsDriverNode extends FsDriverBase {
fsErrorToJsError_(error, path = null) {
let msg = error.toString();
if (path !== null) msg += '. Path: ' + path;
if (path !== null) msg += `. Path: ${path}`;
let output = new Error(msg);
if (error.code) output.code = error.code;
return output;
@ -119,7 +119,7 @@ class FsDriverNode extends FsDriverBase {
let output = [];
for (let i = 0; i < items.length; i++) {
const item = items[i];
let stat = await this.stat(path + '/' + item);
let stat = await this.stat(`${path}/${item}`);
if (!stat) continue; // Has been deleted between the readdir() call and now
stat.path = stat.path.substr(path.length + 1);
output.push(stat);
@ -180,7 +180,7 @@ class FsDriverNode extends FsDriverBase {
buffer = buffer.slice(0, result.bytesRead);
if (encoding === 'base64') return buffer.toString('base64');
if (encoding === 'ascii') return buffer.toString('ascii');
throw new Error('Unsupported encoding: ' + encoding);
throw new Error(`Unsupported encoding: ${encoding}`);
}
}