From 7eb9ab9b2a8d42dc28df215457ea6d9aa03b7654 Mon Sep 17 00:00:00 2001 From: Joris Berthelot Date: Wed, 31 Mar 2021 02:06:01 +0200 Subject: [PATCH] Go ecmaVersion 8 --- .eslintrc.json | 3 +-- index.js | 3 ++- tests/.eslintrc.json | 3 +-- tests/adapter/read.js | 8 ++++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 6a0d78f..b1770b9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "parserOptions": { - "ecmaVersion": 6, + "ecmaVersion": 8, "ecmaFeatures": {} }, "rules": { @@ -182,7 +182,6 @@ "no-whitespace-before-property": 2, "no-with": 2, "nonblock-statement-body-position": 2, - "object-curly-spacing": 2, "object-shorthand": [2, "consistent"], "one-var": 2, "operator-assignment": 2, diff --git a/index.js b/index.js index b262876..cede411 100644 --- a/index.js +++ b/index.js @@ -152,7 +152,8 @@ class CloudinaryAdapter extends StorageBase { const opts = options || {}; return new Promise(async (resolve, reject) => { try { - return resolve(await got(opts.path, { responseType: 'buffer', resolveBodyOnly: true })); + return resolve(await got(opts.path, { responseType: 'buffer', + resolveBodyOnly: true })); } catch (err) { return reject(new common.errors.GhostError({ err: err, diff --git a/tests/.eslintrc.json b/tests/.eslintrc.json index 4377425..d22fac5 100644 --- a/tests/.eslintrc.json +++ b/tests/.eslintrc.json @@ -1,7 +1,7 @@ { "plugins": ["mocha"], "parserOptions": { - "ecmaVersion": 6, + "ecmaVersion": 8, "ecmaFeatures": {} }, "rules": { @@ -182,7 +182,6 @@ "no-whitespace-before-property": 2, "no-with": 2, "nonblock-statement-body-position": 2, - "object-curly-spacing": 2, "object-shorthand": 2, "one-var": 2, "operator-assignment": 2, diff --git a/tests/adapter/read.js b/tests/adapter/read.js index 728165a..bc4ca8c 100644 --- a/tests/adapter/read.js +++ b/tests/adapter/read.js @@ -15,8 +15,8 @@ describe('read', function () { cloudinaryAdapter = new CloudinaryAdapter(fixtures.sampleConfig); const scope = nock('https://blog.mornati.net') - .get('/myimage.png') - .reply(200, { "body": "imagecontent" }), + .get('/myimage.png') + .reply(200, { "body": "imagecontent" }), options = { "path": "https://blog.mornati.net/myimage.png" }; cloudinaryAdapter.read(options).then(function () { @@ -39,8 +39,8 @@ describe('read', function () { it('should return an error on inexistent resource', function (done) { const scope = nock('https://blog.mornati.net') - .get('/myimage.png') - .replyWithError('some error occurred'), + .get('/myimage.png') + .replyWithError('some error occurred'), options = { "path": "https://blog.mornati.net/myimage.png" }; cloudinaryAdapter = new CloudinaryAdapter(fixtures.sampleConfig);