Skip to content

Commit 4a9a26c

Browse files
committed
Lint
1 parent 7a55699 commit 4a9a26c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+110
-110
lines changed

src/events/publish.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function eventFactory (arc) {
9191
function publish (arn, payload, callback) {
9292
client.sns.Publish({
9393
TopicArn: arn,
94-
Message: JSON.stringify(payload)
94+
Message: JSON.stringify(payload),
9595
})
9696
.then(result => callback(null, result))
9797
.catch(callback)
@@ -121,7 +121,7 @@ function queueFactory (arc) {
121121
let params = {
122122
QueueUrl: url,
123123
DelaySeconds: delaySeconds || 0,
124-
MessageBody: JSON.stringify(payload)
124+
MessageBody: JSON.stringify(payload),
125125
}
126126
if (url.endsWith('.fifo')) {
127127
params.MessageGroupId = groupID || name

src/events/subscribe.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ let parallel = require('run-parallel')
22

33
let fallback = {
44
Records: [
5-
{ Sns: { Message: JSON.stringify({}) } }
6-
]
5+
{ Sns: { Message: JSON.stringify({}) } },
6+
],
77
}
88

99
/**

src/http/_res-fmt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ module.exports = function responseFormatter (req, params) {
125125
let res = {
126126
headers: Object.assign({}, { 'content-type': type }, params.headers || {}),
127127
statusCode,
128-
body
128+
body,
129129
}
130130

131131
// REST API stuff

src/http/errors/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = function httpError (params) {
55
let {
66
statusCode = 502,
77
title = 'Unknown error',
8-
message = ''
8+
message = '',
99
} = params
1010
title = title === 'Error'
1111
? `${statusCode} error`
@@ -14,7 +14,7 @@ module.exports = function httpError (params) {
1414
statusCode,
1515
headers: {
1616
'content-type': 'text/html; charset=utf8;',
17-
'cache-control': 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0'
17+
'cache-control': 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0',
1818
},
1919
body: `
2020
<!DOCTYPE html>
@@ -83,6 +83,6 @@ module.exports = function httpError (params) {
8383
</div>
8484
</body>
8585
</html>
86-
`
86+
`,
8787
}
8888
}

src/http/helpers/binary-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ module.exports = [
5858
'application/x-rar-compressed',
5959
'application/x-tar',
6060
'application/x-zip',
61-
'application/zip'
61+
'application/zip',
6262
]

src/http/helpers/body-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = function parseBody (req) {
3535
: request.body
3636
request.body = JSON.parse(data) || {}
3737
}
38-
catch (e) {
38+
catch {
3939
throw Error('Invalid request body encoding or invalid JSON')
4040
}
4141
}

src/http/helpers/csrf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = function _csrf (req, res, next) {
77
else {
88
res({
99
status: 403,
10-
html: 'invalid csrf token'
10+
html: 'invalid csrf token',
1111
})
1212
}
1313
}

src/http/session/providers/ddb/create.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = function _create (name, payload, callback) {
1818
if (err) callback(err)
1919
else callback(null, { _secret: val })
2020
})
21-
}
21+
},
2222
],
2323
function _put (err, results) {
2424
if (err) throw err
@@ -29,7 +29,7 @@ module.exports = function _create (name, payload, callback) {
2929
if (err) callback(err)
3030
else data._client.PutItem({
3131
TableName: name,
32-
Item: session
32+
Item: session,
3333
}).then(() => callback(null, session)).catch(callback)
3434
})
3535
})

src/http/session/providers/ddb/find.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = function _find (name, _idx, callback) {
88
else data._client.GetItem({
99
TableName: name,
1010
ConsistentRead: true,
11-
Key: { _idx }
11+
Key: { _idx },
1212
})
1313
.then(item => {
1414
let result = typeof item === 'undefined' ? false : item.Item

src/http/session/providers/ddb/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function write (params, callback) {
103103
let sameSite = ARC_SESSION_SAME_SITE || 'lax'
104104
let options = {
105105
maxAge,
106-
expires: new Date(Date.now() + maxAge * 1000),
106+
expires: new Date(Date.now() + (maxAge * 1000)),
107107
secure: true,
108108
httpOnly: true,
109109
path: '/',

0 commit comments

Comments
 (0)