mirror of https://github.com/webpack/webpack.git
fix lint
This commit is contained in:
parent
0734314753
commit
ffda9bf704
|
@ -27,8 +27,8 @@ const createHash = require("./util/createHash");
|
|||
/** @typedef {import("./NormalModule")} NormalModule */
|
||||
/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */
|
||||
/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */
|
||||
/** @typedef {import("./javascript/JavascriptParser").Range} Range */
|
||||
/** @typedef {import("./javascript/JavascriptParser").DestructuringAssignmentProperty} DestructuringAssignmentProperty */
|
||||
/** @typedef {import("./javascript/JavascriptParser").Range} Range */
|
||||
/** @typedef {import("./logging/Logger").Logger} Logger */
|
||||
|
||||
/** @typedef {null|undefined|RegExp|Function|string|number|boolean|bigint|undefined} CodeValuePrimitive */
|
||||
|
|
|
@ -148,8 +148,7 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
|
|||
*/
|
||||
getReferencedExports(moduleGraph, runtime) {
|
||||
let ids = this.getIds(moduleGraph);
|
||||
if (ids.length === 0)
|
||||
return this._getReferencedExportsInDestructuring(moduleGraph);
|
||||
if (ids.length === 0) return this._getReferencedExportsInDestructuring();
|
||||
let namespaceObjectAsContext = this.namespaceObjectAsContext;
|
||||
if (ids[0] === "default") {
|
||||
const selfModule = moduleGraph.getParentModule(this);
|
||||
|
@ -166,7 +165,7 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
|
|||
case "default-only":
|
||||
case "default-with-named":
|
||||
if (ids.length === 1)
|
||||
return this._getReferencedExportsInDestructuring(moduleGraph);
|
||||
return this._getReferencedExportsInDestructuring();
|
||||
ids = ids.slice(1);
|
||||
namespaceObjectAsContext = true;
|
||||
break;
|
||||
|
@ -184,15 +183,14 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
|
|||
ids = ids.slice(0, -1);
|
||||
}
|
||||
|
||||
return this._getReferencedExportsInDestructuring(moduleGraph, ids);
|
||||
return this._getReferencedExportsInDestructuring(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ModuleGraph} moduleGraph module graph
|
||||
* @param {string[]=} ids ids
|
||||
* @returns {(string[] | ReferencedExport)[]} referenced exports
|
||||
*/
|
||||
_getReferencedExportsInDestructuring(moduleGraph, ids) {
|
||||
_getReferencedExportsInDestructuring(ids) {
|
||||
if (this.referencedPropertiesInDestructuring) {
|
||||
/** @type {ReferencedExport[]} */
|
||||
const refs = [];
|
||||
|
|
Loading…
Reference in New Issue