From 9b9ad902a3e3490536d223ab1d415dfb665a8f85 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Sun, 27 May 2018 15:30:28 +0000 Subject: [PATCH 1/4] Upgrade eslint-config-onelint to version 3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84315f0..86b507f 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "compression": "^1.6.1", "coveralls": "^2.11.4", "eslint": "^3.13.1", - "eslint-config-onelint": "^1.1.0", + "eslint-config-onelint": "^3.0.0", "express": "^4.13.4", "gifsicle-stream": "^0.3.1", "istanbul": "^0.4.5", From 9bf2e47c451e3afb2a1189f71d4de18d503b4402 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Sun, 27 May 2018 16:20:14 +0000 Subject: [PATCH 2/4] Upgrade eslint to version 4.19.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84315f0..7c20c57 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "browser-sync": "^2.18.6", "compression": "^1.6.1", "coveralls": "^2.11.4", - "eslint": "^3.13.1", + "eslint": "^4.19.1", "eslint-config-onelint": "^1.1.0", "express": "^4.13.4", "gifsicle-stream": "^0.3.1", From f2885d8dd8c676bac2df2d3aae890bd168194581 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Sun, 27 May 2018 18:41:12 +0200 Subject: [PATCH 3/4] eslint --fix . --- test/processImage.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/processImage.js b/test/processImage.js index 9b99622..df184d4 100644 --- a/test/processImage.js +++ b/test/processImage.js @@ -196,7 +196,7 @@ describe('express-processimage', function () { Filesize: expect.it('to match', /Ki?$/).and('when passed as parameter to', parseFloat, 'to be less than', 10) }) }) - .then(() => expect(console.error, 'to have no calls satisfying', () => console.error(/DeprecationWarning/))); + .then(() => expect(console.error, 'to have no calls satisfying', () => console.error(/DeprecationWarning/))); }); it('should work and not log deprecation warnings when there is an explicit conversion', function () { @@ -211,7 +211,7 @@ describe('express-processimage', function () { Filesize: expect.it('to match', /Ki?$/).and('when passed as parameter to', parseFloat, 'to be less than', 10) }) }) - .then(() => expect(console.error, 'to have no calls satisfying', () => console.error(/DeprecationWarning/))); + .then(() => expect(console.error, 'to have no calls satisfying', () => console.error(/DeprecationWarning/))); }); }); }); @@ -1006,7 +1006,7 @@ describe('express-processimage', function () { height: 48 } }) - .and('when converted to PNG to resemble', pathModule.resolve(__dirname, '..', 'testdata', 'rotatedBulb.png')) + .and('when converted to PNG to resemble', pathModule.resolve(__dirname, '..', 'testdata', 'rotatedBulb.png')) }); }); @@ -1023,7 +1023,7 @@ describe('express-processimage', function () { }, Interlace: 'Line' }) - .and('when converted to PNG to resemble', pathModule.resolve(__dirname, '..', 'testdata', 'rotatedBulb.png')) + .and('when converted to PNG to resemble', pathModule.resolve(__dirname, '..', 'testdata', 'rotatedBulb.png')) }); }); From e715ad376a6337aa3e1e10c582b577a9e629fb59 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Sun, 27 May 2018 18:43:53 +0200 Subject: [PATCH 4/4] eslint-disable-next-line handle-callback-err --- lib/processImage.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/processImage.js b/lib/processImage.js index 1c00cce..ec00c22 100644 --- a/lib/processImage.js +++ b/lib/processImage.js @@ -57,6 +57,8 @@ module.exports = function (options) { } } delete req.headers['if-modified-since']; // Prevent false positive conditional GETs after enabling processimage + // hijackResponse will never pass an error here + // eslint-disable-next-line handle-callback-err hijackResponse(res, function (err, res) { // Polyfill res.status for browser-sync compatibility if (typeof res.status !== 'function') {