Skip to content

Commit 47002dc

Browse files
committed
style: fix linting
1 parent 7b4cf0b commit 47002dc

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

lib/storage-handler.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ exports.upload = function(provider, req, res, options, cb) {
5252
self._fieldsSize += buffer.length;
5353
if (self._fieldsSize > self.maxFieldsSize) {
5454
self._error(new Error(
55-
g.f('{{maxFieldsSize}} exceeded, received %s bytes of field data',
55+
g.f(
56+
'{{maxFieldsSize}} exceeded, received %s bytes of field data',
5657
self._fieldsSize
57-
)));
58+
)
59+
));
5860
return;
5961
}
6062
value += decoder.write(buffer);
@@ -104,10 +106,12 @@ exports.upload = function(provider, req, res, options, cb) {
104106
if (Array.isArray(allowedContentTypes) && allowedContentTypes.length !== 0) {
105107
if (allowedContentTypes.indexOf(file.type) === -1) {
106108
self._error(new Error(
107-
g.f('{{contentType}} "%s" is not allowed (Must be in [%s])',
109+
g.f(
110+
'{{contentType}} "%s" is not allowed (Must be in [%s])',
108111
file.type,
109112
allowedContentTypes.join(', ')
110-
)));
113+
)
114+
));
111115
return;
112116
}
113117
}
@@ -203,10 +207,12 @@ exports.upload = function(provider, req, res, options, cb) {
203207
// - s3-upload-stream doesn't provide a way to do this in it's public interface
204208
// - We could call provider.delete file but it would not delete multipart data
205209
self._error(new Error(
206-
g.f('{{maxFileSize}} exceeded, received %s bytes of field data (max is %s)',
210+
g.f(
211+
'{{maxFileSize}} exceeded, received %s bytes of field data (max is %s)',
207212
fileSize,
208213
maxFileSize
209-
)));
214+
)
215+
));
210216
return;
211217
}
212218
});

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"uuid": "^3.2.1"
2121
},
2222
"devDependencies": {
23-
"eslint": "^4.19.1",
24-
"eslint-config-loopback": "^10.0.0",
23+
"eslint": "^5.4.0",
24+
"eslint-config-loopback": "^11.0.0",
2525
"express": "^4.16.3",
26-
"loopback": "^3.20.0",
26+
"loopback": "^3.22.1",
2727
"mkdirp": "^0.5.1",
2828
"mocha": "^5.2.0",
2929
"supertest": "^3.1.0",

0 commit comments

Comments
 (0)