mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
meta: enable jsdoc/check-tag-names rule
PR-URL: https://github.com/nodejs/node/pull/58521 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
parent
036b1fd66d
commit
0fd1ecded6
86 changed files with 495 additions and 247 deletions
|
@ -52,6 +52,7 @@ const {
|
|||
let defaultConditions;
|
||||
/**
|
||||
* Returns the default conditions for ES module loading.
|
||||
* @returns {object}
|
||||
*/
|
||||
function getDefaultConditions() {
|
||||
assert(defaultConditions !== undefined);
|
||||
|
@ -62,6 +63,7 @@ function getDefaultConditions() {
|
|||
let defaultConditionsSet;
|
||||
/**
|
||||
* Returns the default conditions for ES module loading, as a Set.
|
||||
* @returns {Set<any>}
|
||||
*/
|
||||
function getDefaultConditionsSet() {
|
||||
assert(defaultConditionsSet !== undefined);
|
||||
|
@ -71,6 +73,7 @@ function getDefaultConditionsSet() {
|
|||
/**
|
||||
* Initializes the default conditions for ESM module loading.
|
||||
* This function is called during pre-execution, before any user code is run.
|
||||
* @returns {void}
|
||||
*/
|
||||
function initializeDefaultConditions() {
|
||||
const userConditions = getOptionValue('--conditions');
|
||||
|
@ -102,9 +105,10 @@ function getConditionsSet(conditions) {
|
|||
return getDefaultConditionsSet();
|
||||
}
|
||||
|
||||
/* eslint-disable jsdoc/valid-types */
|
||||
/**
|
||||
* @typedef {{
|
||||
* [Symbol.toStringTag]: 'Module',
|
||||
* [Symbol.toStringTag]: () => 'Module'
|
||||
* }} ModuleNamespaceObject
|
||||
*/
|
||||
|
||||
|
@ -186,6 +190,7 @@ function registerModule(referrer, registry) {
|
|||
* Proxy the import meta handling to the default loader for source text modules.
|
||||
* @param {Record<string, string | Function>} meta - The import.meta object to initialize.
|
||||
* @param {ModuleWrap} wrap - The ModuleWrap of the SourceTextModule where `import.meta` is referenced.
|
||||
* @returns {object}
|
||||
*/
|
||||
function defaultInitializeImportMetaForModule(meta, wrap) {
|
||||
const cascadedLoader = require('internal/modules/esm/loader').getOrInitializeCascadedLoader();
|
||||
|
@ -283,7 +288,7 @@ let _forceDefaultLoader = false;
|
|||
* Initializes handling of ES modules.
|
||||
* This is configured during pre-execution. Specifically it's set to true for
|
||||
* the loader worker in internal/main/worker_thread.js.
|
||||
* @param {boolean} [forceDefaultLoader=false] - A boolean indicating disabling custom loaders.
|
||||
* @param {boolean} [forceDefaultLoader] - A boolean indicating disabling custom loaders.
|
||||
*/
|
||||
function initializeESM(forceDefaultLoader = false) {
|
||||
_forceDefaultLoader = forceDefaultLoader;
|
||||
|
@ -305,6 +310,7 @@ function forceDefaultLoader() {
|
|||
|
||||
/**
|
||||
* Register module customization hooks.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
async function initializeHooks() {
|
||||
const customLoaderURLs = getOptionValue('--experimental-loader');
|
||||
|
@ -342,7 +348,7 @@ async function initializeHooks() {
|
|||
* @param {string} url URL of the module.
|
||||
* @param {string} source Source code of the module.
|
||||
* @param {typeof import('./loader.js').ModuleLoader|undefined} cascadedLoader If provided,
|
||||
* register the module for default handling.
|
||||
* register the module for default handling.
|
||||
* @param {{ isMain?: boolean }|undefined} context - context object containing module metadata.
|
||||
* @returns {ModuleWrap}
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue