first commit

This commit is contained in:
2026-08-06 12:00:39 +10:00
commit 91221f5a8e
3259 changed files with 569069 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
//#region lib/utils/scope.js
var require_scope = /* @__PURE__ */ require("../_virtual/_rolldown/runtime.js").__commonJSMin(((exports, module) => {
module.exports = { getScope };
/**
* Gets the scope for the current node
* @param {RuleContext} context The rule context
* @param {ESNode} currentNode The node to get the scope of
* @returns { import('eslint').Scope.Scope } The scope information for this node
*/
function getScope(context, currentNode) {
const isInner = currentNode.type !== "Program";
const scopeManager = context.sourceCode.scopeManager;
/** @type {ESNode | null} */
let node = currentNode;
for (; node; node = node.parent) {
const scope = scopeManager.acquire(node, isInner);
if (scope) {
if (scope.type === "function-expression-name") return scope.childScopes[0];
return scope;
}
}
return scopeManager.scopes[0];
}
}));
//#endregion
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return require_scope();
}
});