| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7f654ce commit 324d9fc
86 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -386,7 +386,7 @@ function getUrlData(withBase) { | |||
| 386 | 386 | * @param {number} e The repetition of the data, as exponent of 2 | |
| 387 | 387 | * @param {boolean} withBase Whether to include a base URL | |
| 388 | 388 | * @param {boolean} asUrl Whether to return the results as URL objects | |
| 389 | - * @return {string[] | string[][] | URL[]} | ||
| 389 | + * @returns {string[] | string[][] | URL[]} | ||
| 390 | 390 | */ | |
| 391 | 391 | function bakeUrlData(type, e = 0, withBase = false, asUrl = false) { | |
| 392 | 392 | let result = []; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -262,17 +262,21 @@ export default [ | |||
| 262 | 262 | // ESLint recommended rules that we disable. | |
| 263 | 263 | 'no-inner-declarations': 'off', | |
| 264 | 264 | ||
| 265 | - // JSDoc recommended rules that we disable. | ||
| 265 | + // JSDoc rules. | ||
| 266 | 266 | 'jsdoc/require-jsdoc': 'off', | |
| 267 | 267 | 'jsdoc/require-param-description': 'off', | |
| 268 | - 'jsdoc/newline-after-description': 'off', | ||
| 269 | 268 | 'jsdoc/require-returns-description': 'off', | |
| 270 | - 'jsdoc/valid-types': 'off', | ||
| 271 | - 'jsdoc/no-defaults': 'off', | ||
| 269 | + 'jsdoc/valid-types': 'error', | ||
| 270 | + 'jsdoc/no-defaults': 'error', | ||
| 272 | 271 | 'jsdoc/no-undefined-types': 'off', | |
| 273 | 272 | 'jsdoc/require-param': 'off', | |
| 274 | - 'jsdoc/check-tag-names': 'off', | ||
| 275 | - 'jsdoc/require-returns': 'off', | ||
| 273 | + 'jsdoc/check-tag-names': 'error', | ||
| 274 | + 'jsdoc/require-returns': 'error', | ||
| 275 | + 'jsdoc/check-line-alignment': ['error', 'any', { | ||
| 276 | + tags: ['param', 'property', 'returns', 'file'], | ||
| 277 | + wrapIndent: ' ', | ||
| 278 | + }], | ||
| 279 | + 'jsdoc/check-alignment': 'error', | ||
| 276 | 280 | ||
| 277 | 281 | // Stylistic rules. | |
| 278 | 282 | '@stylistic/js/arrow-parens': 'error', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -206,6 +206,8 @@ const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; | |||
| 206 | 206 | * Verifies that the given val is a valid HTTP token | |
| 207 | 207 | * per the rules defined in RFC 7230 | |
| 208 | 208 | * See https://tools.ietf.org/html/rfc7230#section-3.2.6 | |
| 209 | + * @param {string} val | ||
| 210 | + * @returns {boolean} | ||
| 209 | 211 | */ | |
| 210 | 212 | function checkIsHttpToken(val) { | |
| 211 | 213 | return tokenRegExp.test(val); | |
@@ -217,6 +219,8 @@ const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; | |||
| 217 | 219 | * field-value = *( field-content / obs-fold ) | |
| 218 | 220 | * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] | |
| 219 | 221 | * field-vchar = VCHAR / obs-text | |
| 222 | + * @param {string} val | ||
| 223 | + * @returns {boolean} | ||
| 220 | 224 | */ | |
| 221 | 225 | function checkInvalidHeaderChar(val) { | |
| 222 | 226 | return headerCharRegex.test(val); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -268,6 +268,7 @@ function _copyActual(source, target, targetStart, sourceStart, sourceEnd) { | |||
| 268 | 268 | * runtime deprecation would introduce too much breakage at this time. It's not | |
| 269 | 269 | * likely that the Buffer constructors would ever actually be removed. | |
| 270 | 270 | * Deprecation Code: DEP0005 | |
| 271 | + * @returns {Buffer} | ||
| 271 | 272 | */ | |
| 272 | 273 | function Buffer(arg, encodingOrOffset, length) { | |
| 273 | 274 | showFlaggedDeprecation(); | |
@@ -295,6 +296,10 @@ ObjectDefineProperty(Buffer, SymbolSpecies, { | |||
| 295 | 296 | * Buffer.from(array) | |
| 296 | 297 | * Buffer.from(buffer) | |
| 297 | 298 | * Buffer.from(arrayBuffer[, byteOffset[, length]]) | |
| 299 | + * @param {any} value | ||
| 300 | + * @param {BufferEncoding|number} encodingOrOffset | ||
| 301 | + * @param {number} [length] | ||
| 302 | + * @returns {Buffer} | ||
| 298 | 303 | */ | |
| 299 | 304 | Buffer.from = function from(value, encodingOrOffset, length) { | |
| 300 | 305 | if (typeof value === 'string') | |
@@ -391,6 +396,7 @@ ObjectSetPrototypeOf(Buffer, Uint8Array); | |||
| 391 | 396 | /** | |
| 392 | 397 | * Creates a new filled Buffer instance. | |
| 393 | 398 | * alloc(size[, fill[, encoding]]) | |
| 399 | + * @returns {FastBuffer} | ||
| 394 | 400 | */ | |
| 395 | 401 | Buffer.alloc = function alloc(size, fill, encoding) { | |
| 396 | 402 | validateNumber(size, 'size', 0, kMaxLength); | |
@@ -404,6 +410,7 @@ Buffer.alloc = function alloc(size, fill, encoding) { | |||
| 404 | 410 | /** | |
| 405 | 411 | * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer | |
| 406 | 412 | * instance. If `--zero-fill-buffers` is set, will zero-fill the buffer. | |
| 413 | + * @returns {FastBuffer} | ||
| 407 | 414 | */ | |
| 408 | 415 | Buffer.allocUnsafe = function allocUnsafe(size) { | |
| 409 | 416 | validateNumber(size, 'size', 0, kMaxLength); | |
@@ -414,6 +421,8 @@ Buffer.allocUnsafe = function allocUnsafe(size) { | |||
| 414 | 421 | * Equivalent to SlowBuffer(num), by default creates a non-zero-filled | |
| 415 | 422 | * Buffer instance that is not allocated off the pre-initialized pool. | |
| 416 | 423 | * If `--zero-fill-buffers` is set, will zero-fill the buffer. | |
| 424 | + * @param {number} size | ||
| 425 | + * @returns {FastBuffer|undefined} | ||
| 417 | 426 | */ | |
| 418 | 427 | Buffer.allocUnsafeSlow = function allocUnsafeSlow(size) { | |
| 419 | 428 | validateNumber(size, 'size', 0, kMaxLength); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -157,8 +157,8 @@ function lazyEventEmitterAsyncResource() { | |||
| 157 | 157 | } | |
| 158 | 158 | ||
| 159 | 159 | /** | |
| 160 | - * @param {symbol,string} event | ||
| 161 | - * @param {...any} args | ||
| 160 | + * @param {symbol|string} event | ||
| 161 | + * @param {any[]} args | ||
| 162 | 162 | * @returns {boolean} | |
| 163 | 163 | */ | |
| 164 | 164 | emit(event, ...args) { | |
@@ -203,7 +203,7 @@ function lazyEventEmitterAsyncResource() { | |||
| 203 | 203 | /** | |
| 204 | 204 | * Creates a new `EventEmitter` instance. | |
| 205 | 205 | * @param {{ captureRejections?: boolean; }} [opts] | |
| 206 | - * @constructs {EventEmitter} | ||
| 206 | + * @constructs EventEmitter | ||
| 207 | 207 | */ | |
| 208 | 208 | function EventEmitter(opts) { | |
| 209 | 209 | EventEmitter.init.call(this, opts); | |
@@ -1115,24 +1115,28 @@ function on(emitter, event, options = kEmptyObject) { | |||
| 1115 | 1115 | [kWatermarkData]: { | |
| 1116 | 1116 | /** | |
| 1117 | 1117 | * The current queue size | |
| 1118 | + * @returns {number} | ||
| 1118 | 1119 | */ | |
| 1119 | 1120 | get size() { | |
| 1120 | 1121 | return size; | |
| 1121 | 1122 | }, | |
| 1122 | 1123 | /** | |
| 1123 | 1124 | * The low watermark. The emitter is resumed every time size is lower than it | |
| 1125 | + * @returns {number} | ||
| 1124 | 1126 | */ | |
| 1125 | 1127 | get low() { | |
| 1126 | 1128 | return lowWatermark; | |
| 1127 | 1129 | }, | |
| 1128 | 1130 | /** | |
| 1129 | 1131 | * The high watermark. The emitter is paused every time size is higher than it | |
| 1132 | + * @returns {number} | ||
| 1130 | 1133 | */ | |
| 1131 | 1134 | get high() { | |
| 1132 | 1135 | return highWatermark; | |
| 1133 | 1136 | }, | |
| 1134 | 1137 | /** | |
| 1135 | 1138 | * It checks whether the emitter is paused by the watermark controller or not | |
| 1139 | + * @returns {boolean} | ||
| 1136 | 1140 | */ | |
| 1137 | 1141 | get isPaused() { | |
| 1138 | 1142 | return paused; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -442,7 +442,7 @@ function createConnection(...args) { | |||
| 442 | 442 | * protocol?: string; | |
| 443 | 443 | * proxyEnv?: object; | |
| 444 | 444 | * }} [options] | |
| 445 | - * @constructor | ||
| 445 | + * @class | ||
| 446 | 446 | */ | |
| 447 | 447 | function Agent(options) { | |
| 448 | 448 | if (!(this instanceof Agent)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -534,6 +534,7 @@ function transferableAbortSignal(signal) { | |||
| 534 | 534 | ||
| 535 | 535 | /** | |
| 536 | 536 | * Creates an AbortController with a transferable AbortSignal | |
| 537 | + * @returns {AbortController} | ||
| 537 | 538 | */ | |
| 538 | 539 | function transferableAbortController() { | |
| 539 | 540 | return AbortController[kMakeTransferable](); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -449,7 +449,7 @@ function clearDefaultTriggerAsyncId() { | |||
| 449 | 449 | * @template {unknown} R | |
| 450 | 450 | * @param {number} triggerAsyncId | |
| 451 | 451 | * @param { (...T: args) => R } block | |
| 452 | - * @param {T} args | ||
| 452 | + * @param {T} args | ||
| 453 | 453 | * @returns {R} | |
| 454 | 454 | */ | |
| 455 | 455 | function defaultTriggerAsyncIdScope(triggerAsyncId, block, ...args) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -137,7 +137,7 @@ class Blob { | |||
| 137 | 137 | * endings? : string, | |
| 138 | 138 | * type? : string, | |
| 139 | 139 | * }} [options] | |
| 140 | - * @constructs {Blob} | ||
| 140 | + * @constructs Blob | ||
| 141 | 141 | */ | |
| 142 | 142 | constructor(sources = [], options) { | |
| 143 | 143 | markTransferMode(this, true, false); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -69,6 +69,7 @@ const kFinalized = Symbol('kFinalized'); | |||
| 69 | 69 | ||
| 70 | 70 | /** | |
| 71 | 71 | * @param {string} name | |
| 72 | + * @returns {string} | ||
| 72 | 73 | */ | |
| 73 | 74 | function normalizeAlgorithm(name) { | |
| 74 | 75 | return StringPrototypeReplace(StringPrototypeToLowerCase(name), '-', ''); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments