From 6ff90270ca17bef42ac961091390ee0b020c08e1 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 22 Feb 2023 01:22:23 +0100 Subject: [PATCH] tls: add trailing commas in source files PR-URL: https://github.com/nodejs/node/pull/46715 Reviewed-By: Debadree Chatterjee Reviewed-By: Darshan Sen Reviewed-By: Moshe Atlow --- lib/.eslintrc.yaml | 3 ++- lib/_tls_wrap.js | 10 +++++----- lib/internal/tls/secure-pair.js | 2 +- lib/tls.js | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index a225fa36b3f658..bc71f8a3d41bb8 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -287,7 +287,7 @@ overrides: - ./internal/structured_clone.js - ./internal/test/*.js - ./internal/test_runner/**/*.js - - ./internal/tls/secure-context.js + - ./internal/tls/*.js - ./internal/util/parse_args/*.js - ./internal/v8_prof_processor.js - ./internal/vm.js @@ -301,6 +301,7 @@ overrides: - ./stream/*.js - ./sys.js - ./test.js + - ./tls.js - ./url.js - ./util/*.js rules: diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 377187a6e5a3d1..095297f96a7b76 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -79,7 +79,7 @@ const { ERR_TLS_REQUIRED_SERVER_NAME, ERR_TLS_SESSION_ATTACK, ERR_TLS_SNI_FROM_SERVER, - ERR_TLS_INVALID_STATE + ERR_TLS_INVALID_STATE, } = codes; const { onpskexchange: kOnPskExchange } = internalBinding('symbols'); const { @@ -97,7 +97,7 @@ const { validateUint32, } = require('internal/validators'); const { - InternalX509Certificate + InternalX509Certificate, } = require('internal/crypto/x509'); const traceTls = getOptionValue('--trace-tls'); const tlsKeylog = getOptionValue('--tls-keylog'); @@ -653,7 +653,7 @@ function defineHandleReading(socket, handle) { }, set: (value) => { socket[kRes].reading = value; - } + }, }); } @@ -1379,7 +1379,7 @@ Server.prototype.setSecureContext = function(options) { Server.prototype._getServerData = function() { return { - ticketKeys: this.getTicketKeys().toString('hex') + ticketKeys: this.getTicketKeys().toString('hex'), }; }; @@ -1615,7 +1615,7 @@ exports.connect = function connect(...args) { ciphers: tls.DEFAULT_CIPHERS, checkServerIdentity: tls.checkServerIdentity, minDHSize: 1024, - ...options + ...options, }; if (!options.keepAlive) diff --git a/lib/internal/tls/secure-pair.js b/lib/internal/tls/secure-pair.js index db999d90ccffd9..7e0a2f992a82b8 100644 --- a/lib/internal/tls/secure-pair.js +++ b/lib/internal/tls/secure-pair.js @@ -71,7 +71,7 @@ class SecurePair extends EventEmitter { isServer, requestCert, rejectUnauthorized, - ...options + ...options, }); this.cleartext.once('secure', () => this.emit('secure')); } diff --git a/lib/tls.js b/lib/tls.js index ede721a9b7f043..b78f56d49a1c25 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -49,7 +49,7 @@ const { const { ERR_TLS_CERT_ALTNAME_FORMAT, ERR_TLS_CERT_ALTNAME_INVALID, - ERR_OUT_OF_RANGE + ERR_OUT_OF_RANGE, } = require('internal/errors').codes; const internalUtil = require('internal/util'); internalUtil.assertCrypto();