Skip to content

Commit 0813c52

Browse files
committed
fix eslint errors
1 parent eec35e4 commit 0813c52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+103
-104
lines changed

lib/internal/crypto/hash.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const kFinalized = Symbol('kFinalized');
6868

6969
/**
7070
* @param {string} name
71+
* @returns {string}
7172
*/
7273
function normalizeAlgorithm(name) {
7374
return StringPrototypeReplace(StringPrototypeToLowerCase(name), '-', '');

lib/internal/crypto/random.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ function generatePrimeSync(size, options = kEmptyObject) {
503503
* 48 is the ASCII code for '0', 97 is the ASCII code for 'a'.
504504
* @param {number} number An integer between 0 and 15.
505505
* @returns {number} corresponding to the ASCII code of the hex representation
506-
* of the parameter.
506+
* of the parameter.
507507
*/
508508
const numberToHexCharCode = (number) => (number < 10 ? 48 : 87) + number;
509509

lib/internal/dns/promises.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function onlookupall(err, addresses) {
124124
* @param {string} hostname - The hostname to resolve.
125125
* @param {boolean} all - Whether to resolve with all IP addresses for the hostname.
126126
* @param {number} hints - One or more supported getaddrinfo flags (supply multiple via
127-
* bitwise OR).
127+
* bitwise OR).
128128
* @param {number} dnsOrder - How to sort results. Must be `ipv4first`, `ipv6first` or `verbatim`.
129129
* @returns {Promise<DNSLookupResult | DNSLookupResult[]>} The IP address(es) of the hostname.
130130
* @typedef {object} DNSLookupResult
@@ -187,9 +187,9 @@ function createLookupPromise(family, hostname, all, hints, dnsOrder) {
187187
* @param {boolean} [options.all] - Whether to return all or just the first resolved address.
188188
* @param {0 | 4 | 6} [options.family] - The record family. Must be 4, 6, or 0 (for both).
189189
* @param {number} [options.hints] - One or more supported getaddrinfo flags (supply multiple via
190-
* bitwise OR).
190+
* bitwise OR).
191191
* @param {'ipv4first' | 'ipv6first' | 'verbatim'} [options.order] - Return results in same order DNS resolved them;
192-
* New code should supply `verbatim`.
192+
* New code should supply `verbatim`.
193193
* @returns {Promise<object>}
194194
*/
195195
function lookup(hostname, options) {

lib/internal/errors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ function isPermissionModelError(err) {
126126
* of error objects created in a VM Context will always invoke the
127127
* prepareStackTraceCallback of the principal realm.
128128
* @param {object} globalThis The global object of the realm that the error was
129-
* created in. When the error object is created in a VM Context, this is the
130-
* global object of that VM Context.
129+
* created in. When the error object is created in a VM Context, this is the
130+
* global object of that VM Context.
131131
* @param {object} error The error object.
132132
* @param {CallSite[]} trace An array of CallSite objects, read more at https://v8.dev/docs/stack-trace-api#customizing-stack-traces.
133133
* @returns {string}

lib/internal/event_target.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,6 @@ function isCustomEvent(value) {
373373
return isEvent(value) && (value?.[kDetail] !== undefined);
374374
}
375375

376-
/**
377-
* @class
378-
*/
379376
class CustomEvent extends Event {
380377
/**
381378
* @param {string} type

lib/internal/modules/cjs/loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ function getDefaultLoad(url, filename) {
11461146
* @param {string} url The module URL (with the node: prefix)
11471147
* @param {string} format Format from resolution.
11481148
* @returns {any} If there are no load hooks or the load hooks do not override the format of the
1149-
* builtin, load and return the exports of the builtin. Otherwise, return undefined.
1149+
* builtin, load and return the exports of the builtin. Otherwise, return undefined.
11501150
*/
11511151
function loadBuiltinWithHooks(id, url, format) {
11521152
if (loadHooks.length) {
@@ -1666,7 +1666,7 @@ function wrapSafe(filename, content, cjsModuleInstance, format) {
16661666
* @param {string} content The source code of the module
16671667
* @param {string} filename The file path of the module
16681668
* @param {'module'|'commonjs'|'commonjs-typescript'|'module-typescript'|'typescript'} format
1669-
* Intended format of the module.
1669+
* Intended format of the module.
16701670
* @returns {any}
16711671
*/
16721672
Module.prototype._compile = function(content, filename, format) {

lib/internal/modules/customization_hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function buildHooks(hooks, name, defaultStep, validate, mergedContext) {
175175
* in order to fill in missing arguments or check returned results.
176176
* Due to the merging of the context, this must be a closure.
177177
* @param {number} index Index in the chain. Default step is 0, last added hook is 1,
178-
* and so on.
178+
* and so on.
179179
* @param {Function} userHookOrDefault Either the user hook or the default step to invoke.
180180
* @param {Function|undefined} next The next wrapped step. If this is the default step, it's undefined.
181181
* @returns {Function} Wrapped hook or default step.

lib/internal/modules/esm/assert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const supportedTypeAttributes = ArrayPrototypeFilter(
4848
* @param {string} url The URL of the imported module, for error reporting.
4949
* @param {string} format One of Node's supported translators
5050
* @param {Record<string, string>} importAttributes Validations for the
51-
* module import.
51+
* module import.
5252
* @returns {true}
5353
* @throws {TypeError} If the format and type attribute are incompatible.
5454
*/

lib/internal/modules/esm/hooks.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class Hooks {
143143
* @param {string} urlOrSpecifier
144144
* @param {string} parentURL
145145
* @param {any} [data] Arbitrary data to be passed from the custom
146-
* loader (user-land) to the worker.
146+
* loader (user-land) to the worker.
147147
*/
148148
async register(urlOrSpecifier, parentURL, data, isInternal) {
149149
const cascadedLoader = require('internal/modules/esm/loader').getOrInitializeCascadedLoader();
@@ -162,7 +162,7 @@ class Hooks {
162162
* @param {string} url Custom loader specifier
163163
* @param {Record<string, unknown>} exports
164164
* @param {any} [data] Arbitrary data to be passed from the custom loader (user-land)
165-
* to the worker.
165+
* to the worker.
166166
* @returns {any | Promise<any>} User data, ignored unless it's a promise, in which case it will be awaited.
167167
*/
168168
addCustomLoader(url, exports, data) {
@@ -190,10 +190,10 @@ class Hooks {
190190
* hooks starts at the top and each call to `nextResolve()` moves down 1 step
191191
* until it reaches the bottom or short-circuits.
192192
* @param {string} originalSpecifier The specified URL path of the module to
193-
* be resolved.
193+
* be resolved.
194194
* @param {string} [parentURL] The URL path of the module's parent.
195195
* @param {ImportAttributes} [importAttributes] Attributes from the import
196-
* statement or expression.
196+
* statement or expression.
197197
* @returns {Promise<{ format: string, url: URL['href'] }>}
198198
*/
199199
async resolve(
@@ -688,18 +688,18 @@ function pluckHooks({
688688
* chain, and generate and supply the `next<HookName>` argument to the custom
689689
* hook.
690690
* @param {KeyedHook} current The (currently) first hook in the chain (this shifts
691-
* on every call).
691+
* on every call).
692692
* @param {object} meta Properties that change as the current hook advances
693-
* along the chain.
693+
* along the chain.
694694
* @param {boolean} meta.chainFinished Whether the end of the chain has been
695-
* reached AND invoked.
695+
* reached AND invoked.
696696
* @param {string} meta.hookErrIdentifier A user-facing identifier to help
697-
* pinpoint where an error occurred. Ex "file:///foo.mjs 'resolve'".
697+
* pinpoint where an error occurred. Ex "file:///foo.mjs 'resolve'".
698698
* @param {string} meta.hookName The kind of hook the chain is (ex 'resolve')
699699
* @param {boolean} meta.shortCircuited Whether a hook signaled a short-circuit.
700700
* @param {function(string, unknown): void} validate A wrapper function
701-
* containing all validation of a custom loader hook's intermediary output. Any
702-
* validation within MUST throw.
701+
* containing all validation of a custom loader hook's intermediary output. Any
702+
* validation within MUST throw.
703703
* @returns {Function} The next hook in the chain.
704704
*/
705705
function nextHookFactory(current, meta, { validateArgs, validateOutput }) {

lib/internal/modules/esm/initialize_import_meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function createImportMetaResolve(defaultParentURL, loader, allowParentURL) {
2222
/**
2323
* @param {string} specifier
2424
* @param {URL['href']} [parentURL] When `--experimental-import-meta-resolve` is specified, a
25-
* second argument can be provided.
25+
* second argument can be provided.
2626
* @returns {string}
2727
*/
2828
return function resolve(specifier, parentURL = defaultParentURL) {

0 commit comments

Comments
 (0)