@typescript-eslint/scope-manager
Advanced tools
Comparing version 4.8.3-alpha.0 to 4.8.3-alpha.1
@@ -5,2 +5,3 @@ import { TSESTree } from '@typescript-eslint/types'; | ||
childVisitorKeys?: VisitorKeys | null; | ||
visitChildrenEvenIfSelectorExists?: boolean; | ||
} | ||
@@ -7,0 +8,0 @@ declare abstract class VisitorBase { |
@@ -15,3 +15,3 @@ "use strict"; | ||
}; | ||
var _childVisitorKeys; | ||
var _childVisitorKeys, _visitChildrenEvenIfSelectorExists; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -28,5 +28,7 @@ exports.VisitorBase = void 0; | ||
constructor(options) { | ||
var _a; | ||
var _a, _b; | ||
_childVisitorKeys.set(this, void 0); | ||
_visitChildrenEvenIfSelectorExists.set(this, void 0); | ||
__classPrivateFieldSet(this, _childVisitorKeys, (_a = options.childVisitorKeys) !== null && _a !== void 0 ? _a : visitor_keys_1.visitorKeys); | ||
__classPrivateFieldSet(this, _visitChildrenEvenIfSelectorExists, (_b = options.visitChildrenEvenIfSelectorExists) !== null && _b !== void 0 ? _b : false); | ||
} | ||
@@ -38,3 +40,3 @@ /** | ||
*/ | ||
visitChildren(node, excludeArr) { | ||
visitChildren(node, excludeArr = []) { | ||
var _a; | ||
@@ -44,3 +46,3 @@ if (node == null || node.type == null) { | ||
} | ||
const exclude = new Set(excludeArr); | ||
const exclude = new Set(excludeArr.concat(['parent'])); | ||
const children = (_a = __classPrivateFieldGet(this, _childVisitorKeys)[node.type]) !== null && _a !== void 0 ? _a : Object.keys(node); | ||
@@ -76,3 +78,6 @@ for (const key of children) { | ||
if (visitor) { | ||
return visitor.call(this, node); | ||
visitor.call(this, node); | ||
if (!__classPrivateFieldGet(this, _visitChildrenEvenIfSelectorExists)) { | ||
return; | ||
} | ||
} | ||
@@ -83,3 +88,3 @@ this.visitChildren(node); | ||
exports.VisitorBase = VisitorBase; | ||
_childVisitorKeys = new WeakMap(); | ||
_childVisitorKeys = new WeakMap(), _visitChildrenEvenIfSelectorExists = new WeakMap(); | ||
//# sourceMappingURL=VisitorBase.js.map |
{ | ||
"name": "@typescript-eslint/scope-manager", | ||
"version": "4.8.3-alpha.0+49f86e84", | ||
"version": "4.8.3-alpha.1+665b6d40", | ||
"description": "TypeScript scope analyser for ESLint", | ||
@@ -42,8 +42,8 @@ "keywords": [ | ||
"dependencies": { | ||
"@typescript-eslint/types": "4.8.3-alpha.0+49f86e84", | ||
"@typescript-eslint/visitor-keys": "4.8.3-alpha.0+49f86e84" | ||
"@typescript-eslint/types": "4.8.3-alpha.1+665b6d40", | ||
"@typescript-eslint/visitor-keys": "4.8.3-alpha.1+665b6d40" | ||
}, | ||
"devDependencies": { | ||
"@types/glob": "*", | ||
"@typescript-eslint/typescript-estree": "4.8.3-alpha.0+49f86e84", | ||
"@typescript-eslint/typescript-estree": "4.8.3-alpha.1+665b6d40", | ||
"glob": "*", | ||
@@ -68,3 +68,3 @@ "jest-specific-snapshot": "*", | ||
}, | ||
"gitHead": "49f86e84d02e5e822bd20b7b2a3eb16c77092926" | ||
"gitHead": "665b6d4023fb9d821f348c39aefff0d7571a98bf" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
964028
16948