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,20 +1,19 @@
const Setting = require('lib/models/Setting.js');
class GeolocationReact {
static currentPosition_testResponse() {
return {
mocked: false,
timestamp: (new Date()).getTime(),
timestamp: new Date().getTime(),
coords: {
speed: 0,
heading: 0,
accuracy: 20,
longitude: -3.4596633911132812,
altitude: 0,
latitude: 48.73219093634444
}
}
latitude: 48.73219093634444,
},
};
}
static currentPosition(options = null) {
@ -25,14 +24,17 @@ class GeolocationReact {
if (!('timeout' in options)) options.timeout = 10000;
return new Promise((resolve, reject) => {
navigator.geolocation.getCurrentPosition((data) => {
resolve(data);
}, (error) => {
reject(error);
}, options);
navigator.geolocation.getCurrentPosition(
data => {
resolve(data);
},
error => {
reject(error);
},
options
);
});
}
}
module.exports = { GeolocationReact };
module.exports = { GeolocationReact };