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/tag-lines ESLint rule #41147

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 @@ -350,7 +350,6 @@ module.exports = {
'jsdoc/require-returns': 'off',
'jsdoc/require-property-description': 'off',
'jsdoc/check-param-names': 'off',
'jsdoc/tag-lines': 'off',

// Custom rules from eslint-plugin-node-core
'node-core/no-unescaped-regexp-dot': 'error',
Expand Down
4 changes: 3 additions & 1 deletion lib/internal/blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ function getSource(source, endings) {
class Blob {
/**
* @typedef {string|ArrayBuffer|ArrayBufferView|Blob} SourcePart
*
*/

/**
* @param {SourcePart[]} [sources]
* @param {{
* endings? : string,
Expand Down
8 changes: 6 additions & 2 deletions lib/internal/webstreams/adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ const { UV_EOF } = internalBinding('uv');
* @typedef {import('../../stream').Readable} Readable
* @typedef {import('./writablestream').WritableStream} WritableStream
* @typedef {import('./readablestream').ReadableStream} ReadableStream
*
*/

/**
* @typedef {import('../abort_controller').AbortSignal} AbortSignal
*/

Expand Down Expand Up @@ -525,7 +527,9 @@ function newStreamReadableFromReadableStream(readableStream, options = {}) {
* @typedef {import('./readablestream').ReadableWritablePair
* } ReadableWritablePair
* @typedef {import('../../stream').Duplex} Duplex
*
*/

/**
* @param {Duplex} duplex
* @returns {ReadableWritablePair}
*/
Expand Down
4 changes: 3 additions & 1 deletion lib/internal/webstreams/queuingstrategies.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const isCountQueuingStrategy =
* @callback QueuingStrategySize
* @param {any} chunk
* @returns {number}
*
*/

/**
* @typedef {{
* highWaterMark : number,
* size? : QueuingStrategySize,
Expand Down
33 changes: 24 additions & 9 deletions lib/internal/webstreams/readablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,45 +139,60 @@ const kPull = Symbol('kPull');
* @typedef {import('./queuingstrategies').QueuingStrategySize
* } QueuingStrategySize
* @typedef {import('./writablestream').WritableStream} WritableStream
*
*/

/**
* @typedef {ReadableStreamDefaultController | ReadableByteStreamController
* } ReadableStreamController
*
*/

/**
* @typedef {ReadableStreamDefaultReader | ReadableStreamBYOBReader
* } ReadableStreamReader
*
*/

/**
* @callback UnderlyingSourceStartCallback
* @param {ReadableStreamController} controller
* @returns { any | Promise<void> }
*
*/

/**
* @callback UnderlyingSourcePullCallback
* @param {ReadableStreamController} controller
* @returns { Promise<void> }
*
*/

/**
* @callback UnderlyingSourceCancelCallback
* @param {any} reason
* @returns { Promise<void> }
*
*/

/**
* @typedef {{
* readable: ReadableStream,
* writable: WritableStream,
* }} ReadableWritablePair
*
*/

/**
* @typedef {{
* preventClose? : boolean,
* preventAbort? : boolean,
* preventCancel? : boolean,
* signal? : AbortSignal,
* }} StreamPipeOptions
*
*/

/**
* @typedef {{
* start? : UnderlyingSourceStartCallback,
* pull? : UnderlyingSourcePullCallback,
* cancel? : UnderlyingSourceCancelCallback,
* type? : "bytes",
* autoAllocateChunkSize? : number
* }} UnderlyingSource
*
*/

class ReadableStream {
Expand Down
16 changes: 12 additions & 4 deletions lib/internal/webstreams/transformstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,27 @@ const assert = require('internal/assert');
* } QueuingStrategy
* @typedef {import('./queuingstrategies').QueuingStrategySize
* } QueuingStrategySize
*
*/

/**
* @callback TransformerStartCallback
* @param {TransformStreamDefaultController} controller;
*
*/

/**
* @callback TransformerFlushCallback
* @param {TransformStreamDefaultController} controller;
* @returns {Promise<void>}
*
*/

/**
* @callback TransformerTransformCallback
* @param {any} chunk
* @param {TransformStreamDefaultController} controller
* @returns {Promise<void>}
*
*/

/**
* @typedef {{
* start? : TransformerStartCallback,
* transform? : TransformerTransformCallback,
Expand Down
20 changes: 15 additions & 5 deletions lib/internal/webstreams/writablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,32 @@ const kError = Symbol('kError');
* } QueuingStrategy
* @typedef {import('./queuingstrategies').QueuingStrategySize
* } QueuingStrategySize
*
*/

/**
* @callback UnderlyingSinkStartCallback
* @param {WritableStreamDefaultController} controller
*
*/

/**
* @callback UnderlyingSinkWriteCallback
* @param {any} chunk
* @param {WritableStreamDefaultController} controller
* @returns {Promise<void>}
*
*/

/**
* @callback UnderlyingSinkCloseCallback
* @returns {Promise<void>}
*
*/

/**
* @callback UnderlyingSinkAbortCallback
* @param {any} reason
* @returns {Promise<void>}
*
*/

/**
* @typedef {{
* start? : UnderlyingSinkStartCallback,
* write? : UnderlyingSinkWriteCallback,
Expand Down
3 changes: 0 additions & 3 deletions tools/eslint-rules/crypto-check.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
* @fileoverview Check that common.hasCrypto is used if crypto, tls,
* https, or http2 modules are required.
*
* This rule can be ignored using // eslint-disable-line crypto-check
*
* @author Daniel Bevenius <daniel.bevenius@gmail.com>
*/
'use strict';
Expand Down