From 2a1a96351314a6e8bfc28df0f0736888be7b3c7c Mon Sep 17 00:00:00 2001 From: Kesha Antonov Date: Fri, 23 Dec 2022 09:09:32 +0100 Subject: [PATCH] fix by eslint rules --- index.js | 2 +- lib/downloadTask.js | 3 +-- metro.config.js | 2 +- react-native.config.js | 12 ++++++------ 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index ec66beb..a019f9f 100644 --- a/index.js +++ b/index.js @@ -85,7 +85,7 @@ export function download (options) { : JSON.stringify({}) RNBackgroundDownloader.download(options) - const task = new DownloadTask({ id: options.id, metadata: options.metadata}) + const task = new DownloadTask({ id: options.id, metadata: options.metadata }) tasksMap.set(options.id, task) return task } diff --git a/lib/downloadTask.js b/lib/downloadTask.js index 7ef7c95..667caf6 100644 --- a/lib/downloadTask.js +++ b/lib/downloadTask.js @@ -18,9 +18,8 @@ export default class DownloadTask { this.bytesWritten = taskInfo.bytesWritten ?? 0 this.totalBytes = taskInfo.totalBytes ?? 0 - if (this.#parseable(taskInfo.metadata)) { + if (this.#parseable(taskInfo.metadata)) this.metadata = JSON.parse(taskInfo.metadata) - } if (originalTask) { this._beginHandler = originalTask._beginHandler diff --git a/metro.config.js b/metro.config.js index 13a9642..f3c85f0 100644 --- a/metro.config.js +++ b/metro.config.js @@ -14,4 +14,4 @@ module.exports = { }, }), }, -}; +} diff --git a/react-native.config.js b/react-native.config.js index 4bed80e..ba53c8f 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -2,11 +2,11 @@ module.exports = { dependency: { platforms: { ios: { - project: "./ios/RNBackgroundDownloader.xcodeproj" + project: './ios/RNBackgroundDownloader.xcodeproj', }, android: { - sourceDir: "./android" - } - } - } -}; + sourceDir: './android', + }, + }, + }, +}