meta: enable jsdoc/check-tag-names rule

PR-URL: https://github.com/nodejs/node/pull/58521
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Yagiz Nizipli 2025-07-18 05:28:21 -04:00 committed by GitHub
parent 036b1fd66d
commit 0fd1ecded6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
86 changed files with 495 additions and 247 deletions

View file

@ -88,7 +88,6 @@ const kMappings = Symbol('kMappings');
class StringCharIterator {
/**
* @constructor
* @param {string} string
*/
constructor(string) {
@ -97,21 +96,21 @@ class StringCharIterator {
}
/**
* @return {string}
* @returns {string}
*/
next() {
return StringPrototypeCharAt(this._string, this._position++);
}
/**
* @return {string}
* @returns {string}
*/
peek() {
return StringPrototypeCharAt(this._string, this._position);
}
/**
* @return {boolean}
* @returns {boolean}
*/
hasNext() {
return this._position < this._string.length;
@ -119,6 +118,7 @@ class StringCharIterator {
}
/**
* @class
* Implements Source Map V3 model.
* See https://github.com/google/closure-compiler/wiki/Source-Maps
* for format description.
@ -131,7 +131,6 @@ class SourceMap {
#lineLengths = undefined;
/**
* @constructor
* @param {SourceMapV3} payload
*/
constructor(payload, { lineLengths } = { __proto__: null }) {
@ -150,7 +149,7 @@ class SourceMap {
}
/**
* @return {object} raw source map v3 payload.
* @returns {object} raw source map v3 payload.
*/
get payload() {
return cloneSourceMapV3(this.#payload);
@ -161,7 +160,7 @@ class SourceMap {
}
/**
* @return {number[] | undefined} line lengths of generated source code
* @returns {number[] | undefined} line lengths of generated source code
*/
get lineLengths() {
if (this.#lineLengths) {
@ -192,7 +191,7 @@ class SourceMap {
/**
* @param {number} lineOffset 0-indexed line offset in compiled resource
* @param {number} columnOffset 0-indexed column offset in compiled resource
* @return {object} representing start of range if found, or empty object
* @returns {object} representing start of range if found, or empty object
*/
findEntry(lineOffset, columnOffset) {
let first = 0;
@ -229,7 +228,7 @@ class SourceMap {
/**
* @param {number} lineNumber 1-indexed line number in compiled resource call site
* @param {number} columnNumber 1-indexed column number in compiled resource call site
* @return {object} representing origin call site if found, or empty object
* @returns {object} representing origin call site if found, or empty object
*/
findOrigin(lineNumber, columnNumber) {
const range = this.findEntry(lineNumber - 1, columnNumber - 1);
@ -319,7 +318,7 @@ class SourceMap {
/**
* @param {string} char
* @return {boolean}
* @returns {boolean}
*/
function isSeparator(char) {
return char === ',' || char === ';';
@ -327,7 +326,7 @@ function isSeparator(char) {
/**
* @param {SourceMap.StringCharIterator} stringCharIterator
* @return {number}
* @returns {number}
*/
function decodeVLQ(stringCharIterator) {
// Read unsigned value.
@ -359,7 +358,7 @@ function decodeVLQ(stringCharIterator) {
/**
* @param {SourceMapV3} payload
* @return {SourceMapV3}
* @returns {SourceMapV3}
*/
function cloneSourceMapV3(payload) {
validateObject(payload, 'payload');
@ -375,9 +374,9 @@ function cloneSourceMapV3(payload) {
/**
* @param {Array} entry1 source map entry [lineNumber, columnNumber, sourceURL,
* sourceLineNumber, sourceColumnNumber]
* sourceLineNumber, sourceColumnNumber]
* @param {Array} entry2 source map entry.
* @return {number}
* @returns {number}
*/
function compareSourceMapEntry(entry1, entry2) {
const { 0: lineNumber1, 1: columnNumber1 } = entry1;