Skip to content

Commit f22f622

Browse files
targosaduh95
authored andcommitted
lib: add lint rules for reflective function calls
PR-URL: #60825 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name>
1 parent dcffa88 commit f22f622

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

lib/fs.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,11 +1118,7 @@ function lazyLoadRimraf() {
11181118
/**
11191119
* Asynchronously removes a directory.
11201120
* @param {string | Buffer | URL} path
1121-
* @param {{
1122-
* maxRetries?: number;
1123-
* recursive?: boolean;
1124-
* retryDelay?: number;
1125-
* }} [options]
1121+
* @param {object} [options]
11261122
* @param {(err?: Error) => any} callback
11271123
* @returns {void}
11281124
*/
@@ -1166,11 +1162,7 @@ function rmdir(path, options, callback) {
11661162
/**
11671163
* Synchronously removes a directory.
11681164
* @param {string | Buffer | URL} path
1169-
* @param {{
1170-
* maxRetries?: number;
1171-
* recursive?: boolean;
1172-
* retryDelay?: number;
1173-
* }} [options]
1165+
* @param {object} [options]
11741166
* @returns {void}
11751167
*/
11761168
function rmdirSync(path, options) {

lib/internal/quic/quic.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ class QuicSession {
896896
#onstream = undefined;
897897
/** @type {OnDatagramCallback|undefined} */
898898
#ondatagram = undefined;
899-
/** @type {{}} */
899+
/** @type {object|undefined} */
900900
#sessionticket = undefined;
901901

902902
/**
@@ -927,7 +927,10 @@ class QuicSession {
927927
return this.#handle === undefined || this.#isPendingClose;
928928
}
929929

930-
/** @type {any} */
930+
/**
931+
* Get the session ticket associated with this session, if any.
932+
* @type {object|undefined}
933+
*/
931934
get sessionticket() { return this.#sessionticket; }
932935

933936
/** @type {OnStreamCallback} */
@@ -1665,7 +1668,7 @@ class QuicEndpoint {
16651668

16661669
/**
16671670
* Initiates a session with a remote endpoint.
1668-
* @param {{}} address
1671+
* @param {object} address
16691672
* @param {SessionOptions} [options]
16701673
* @returns {QuicSession}
16711674
*/

lib/internal/webstreams/adapters.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,7 @@ function newStreamDuplexFromReadableWritablePair(pair = kEmptyObject, options =
867867

868868
/**
869869
* @typedef {import('./queuingstrategies').QueuingStrategy} QueuingStrategy
870-
* @typedef {{}} StreamBase
871-
* @param {StreamBase} streamBase
870+
* @param {object} streamBase
872871
* @param {QueuingStrategy} strategy
873872
* @returns {WritableStream}
874873
*/

test/common/heap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ function getHeapSnapshotOptionTests() {
327327
}
328328

329329
/**
330-
* Similar to @see {validateByRetainingPathFromNodes} but creates the snapshot from scratch.
330+
* Similar to {@link validateByRetainingPathFromNodes} but creates the snapshot from scratch.
331331
* @returns {object[]}
332332
*/
333333
function validateByRetainingPath(...args) {

0 commit comments

Comments
 (0)