Skip to content

Commit aa49044

Browse files
Eommdependabot-preview[bot]
authored andcommitted
fix lint
1 parent bc2aeef commit aa49044

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

benchmarks/express-http-proxy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

3-
var proxy = require('express-http-proxy')
4-
var app = require('express')()
3+
const proxy = require('express-http-proxy')
4+
const app = require('express')()
55

66
app.use('/', proxy('localhost:3001'))
77

benchmarks/http-proxy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict'
22

3-
var httpProxy = require('http-proxy')
4-
var { Agent } = require('http')
3+
const httpProxy = require('http-proxy')
4+
const { Agent } = require('http')
55

6-
var proxy = httpProxy.createProxyServer({
6+
const proxy = httpProxy.createProxyServer({
77
target: 'http://localhost:3001',
88
agent: new Agent({
99
keepAlive: true,

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ module.exports = async function (fastify, opts) {
7979
})
8080

8181
function handler (request, reply) {
82-
var dest = request.raw.url
82+
let dest = request.raw.url
8383
dest = dest.replace(this.prefix, rewritePrefix)
8484
reply.from(dest || '/', replyOpts)
8585
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "standard | snazzy && tap test/*.js && npm run typescript",
8+
"lint:fix": "standard --fix",
89
"lint:typescript": "standard --fix --parser @typescript-eslint/parser --plugin typescript test/types/*.ts",
910
"typescript": "tsd"
1011
},

test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ async function run () {
152152
await server.listen(0)
153153
t.tearDown(server.close.bind(server))
154154

155-
var errored = false
155+
let errored = false
156156
try {
157157
await got(`http://localhost:${server.server.address().port}`)
158158
} catch (err) {
@@ -197,7 +197,7 @@ async function run () {
197197
await server.listen(0)
198198
t.tearDown(server.close.bind(server))
199199

200-
var errored = false
200+
let errored = false
201201
try {
202202
await got(`http://localhost:${server.server.address().port}`)
203203
} catch (err) {

0 commit comments

Comments
 (0)