From 8aa3ce8b5979c3f054e4ae717b47e54560652bc2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 7 Dec 2021 06:35:08 -0800 Subject: [PATCH 1/2] doc,lib,tools: align multiline comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These changes are in preparation for enabling a JSDoc lint rule. PR-URL: https://github.com/nodejs/node/pull/41109 Reviewed-By: Antoine du Hamel Reviewed-By: Michaël Zasso Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca --- doc/api/tls.md | 2 +- doc/api/url.md | 4 ++-- lib/internal/bootstrap/loaders.js | 2 +- tools/eslint-rules/rules-utils.js | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index dffefa03842a5f..c45c778da76ac5 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1010,7 +1010,7 @@ const keyingMaterial = tlsSocket.exportKeyingMaterial( 128, 'client finished'); -/** +/* Example return value of keyingMaterial: } - */ + */ static map = new SafeMap( ArrayPrototypeMap(moduleIds, (id) => [id, new NativeModule(id)]) ); diff --git a/tools/eslint-rules/rules-utils.js b/tools/eslint-rules/rules-utils.js index 462ab7c2ff3ab8..1cba9218a1d4b2 100644 --- a/tools/eslint-rules/rules-utils.js +++ b/tools/eslint-rules/rules-utils.js @@ -30,9 +30,9 @@ module.exports.isRequired = function(node, modules) { }; /** -* Return true if common module is required -* in AST Node under inspection -*/ + * Return true if common module is required + * in AST Node under inspection + */ const commonModuleRegExp = new RegExp(/^(\.\.\/)*common(\.js)?$/); module.exports.isCommonModule = function(node) { return isRequireCall(node) && From ecf4114f942bfadfaacc60f7972651166e8e6dae Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 7 Dec 2021 06:35:45 -0800 Subject: [PATCH 2/2] tools: enable JSDoc check-alignment lint rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/41109 Reviewed-By: Antoine du Hamel Reviewed-By: Michaël Zasso Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca --- .eslintrc.js | 1 - 1 file changed, 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index dd7c4ae8cb5f09..1f2e637b9b3eee 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -352,7 +352,6 @@ module.exports = { 'jsdoc/check-param-names': 'off', 'jsdoc/tag-lines': 'off', 'jsdoc/require-returns-type': 'off', - 'jsdoc/check-alignment': 'off', // Custom rules from eslint-plugin-node-core 'node-core/no-unescaped-regexp-dot': 'error',