Skip to content

Commit

Permalink
lib: prepare files for no-var lint rule
Browse files Browse the repository at this point in the history
PR-URL: #42573
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
Trott authored and juanarbol committed May 31, 2022
1 parent 007db8b commit 8f96d73
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/internal/crypto/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function lazyRequire(name) {
return ret;
}

var defaultEncoding = 'buffer';
let defaultEncoding = 'buffer';

function setDefaultEncoding(val) {
defaultEncoding = val;
Expand Down
12 changes: 6 additions & 6 deletions lib/internal/dns/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function onlookupall(err, addresses) {

const family = this.family;

for (var i = 0; i < addresses.length; i++) {
for (let i = 0; i < addresses.length; i++) {
const address = addresses[i];

addresses[i] = {
Expand Down Expand Up @@ -120,10 +120,10 @@ function createLookupPromise(family, hostname, all, hints, verbatim) {
}

function lookup(hostname, options) {
var hints = 0;
var family = -1;
var all = false;
var verbatim = getDefaultVerbatim();
let hints = 0;
let family = -1;
let all = false;
let verbatim = getDefaultVerbatim();

// Parse arguments
if (hostname) {
Expand Down Expand Up @@ -282,7 +282,7 @@ Resolver.prototype.resolveNaptr = resolveMap.NAPTR = resolver('queryNaptr');
Resolver.prototype.resolveSoa = resolveMap.SOA = resolver('querySoa');
Resolver.prototype.reverse = resolver('getHostByAddr');
Resolver.prototype.resolve = function resolve(hostname, rrtype) {
var resolver;
let resolver;

if (rrtype !== undefined) {
validateString(rrtype, 'rrtype');
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/http2/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ const assertWithinRange = hideStackFrames(

function toHeaderObject(headers, sensitiveHeaders) {
const obj = ObjectCreate(null);
for (var n = 0; n < headers.length; n += 2) {
for (let n = 0; n < headers.length; n += 2) {
const name = headers[n];
let value = headers[n + 1];
if (name === HTTP2_HEADER_STATUS)
Expand Down

0 comments on commit 8f96d73

Please sign in to comment.