1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +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

@@ -2,7 +2,6 @@ const RNFS = require('react-native-fs');
const FsDriverBase = require('lib/fs-driver-base');
class FsDriverRN extends FsDriverBase {
appendFileSync(path, string) {
throw new Error('Not implemented');
}
@@ -32,13 +31,13 @@ class FsDriverRN extends FsDriverBase {
isDirectory: () => stat.isDirectory(),
path: path,
size: stat.size,
};
};
}
async readDirStats(path, options = null) {
if (!options) options = {};
if (!('recursive' in options)) options.recursive = false;
let items = await RNFS.readDir(path);
let output = [];
for (let i = 0; i < items.length; i++) {
@@ -96,7 +95,7 @@ class FsDriverRN extends FsDriverBase {
offset: 0,
mode: mode,
stat: stat,
}
};
}
close(handle) {
@@ -145,7 +144,6 @@ class FsDriverRN extends FsDriverBase {
handle.offset += length;
return output ? output : null;
}
}
module.exports.FsDriverRN = FsDriverRN;
module.exports.FsDriverRN = FsDriverRN;