Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools,lib: enable jsdoc/require-returns-type ESLint rule #41130

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ module.exports = {
'jsdoc/require-property-description': 'off',
'jsdoc/check-param-names': 'off',
'jsdoc/tag-lines': 'off',
'jsdoc/require-returns-type': 'off',

// Custom rules from eslint-plugin-node-core
'node-core/no-unescaped-regexp-dot': 'error',
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class Blob {
* endings? : string,
* type? : string,
* }} [options]
* @returns
* @constructs {Blob}
*/
constructor(sources = [], options = {}) {
emitExperimentalWarning('buffer.Blob');
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ Stats.prototype._checkModeProperty = function(property) {
/**
* @param {Float64Array | BigUint64Array} stats
* @param {number} offset
* @returns
* @returns {BigIntStats | Stats}
*/
function getStatsFromBinding(stats, offset = 0) {
if (isBigUint64Array(stats)) {
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/modules/esm/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath,
* @param {Exports} exports
* @param {URL} packageJSONUrl
* @param {string | URL | undefined} base
* @returns
* @returns {boolean}
*/
function isConditionalExportsMainSugar(exports, packageJSONUrl, base) {
if (typeof exports === 'string' || ArrayIsArray(exports)) return true;
Expand Down Expand Up @@ -701,7 +701,7 @@ function patternKeyCompare(a, b) {
* @param {string} name
* @param {string | URL | undefined} base
* @param {Set<string>} conditions
* @returns
* @returns {URL}
*/
function packageImportsResolve(name, base, conditions) {
if (name === '#' || StringPrototypeStartsWith(name, '#/') ||
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/per_context/primordials.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ primordials.PromisePrototypeCatch = (thisPromise, onRejected) =>
* @param {Promise<any>} thisPromise
* @param {() => void) | undefined | null} onFinally The callback to execute
* when the Promise is settled (fulfilled or rejected).
* @returns A Promise for the completion of the callback.
* @returns {Promise} A Promise for the completion of the callback.
*/
primordials.SafePromisePrototypeFinally = (thisPromise, onFinally) =>
// Wrapping on a new Promise is necessary to not expose the SafePromise
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/webstreams/adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ function newReadableWritablePairFromDuplex(duplex) {
* objectMode? : boolean,
* signal? : AbortSignal,
* }} [options]
* @returns
* @returns {Duplex}
*/
function newStreamDuplexFromReadableWritablePair(pair = {}, options = {}) {
validateObject(pair, 'pair');
Expand Down
2 changes: 1 addition & 1 deletion lib/querystring.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function stringifyPrimitive(v) {
/**
* @param {string | number | bigint | boolean} v
* @param {(v: string) => string} encode
* @returns
* @returns {string}
*/
function encodeStringified(v, encode) {
if (typeof v === 'string')
Expand Down