eslint-scope
Advanced tools
Comparing version 8.0.0 to 8.0.1
@@ -48,3 +48,2 @@ /* | ||
*/ | ||
/* eslint no-underscore-dangle: ["error", { "allow": ["__currentScope"] }] */ | ||
@@ -51,0 +50,0 @@ import assert from "assert"; |
@@ -25,4 +25,2 @@ /* | ||
/* eslint-disable no-undefined */ | ||
import estraverse from "estraverse"; | ||
@@ -42,2 +40,5 @@ import esrecurse from "esrecurse"; | ||
/** | ||
* Visitor for destructuring patterns. | ||
*/ | ||
class PatternVisitor extends esrecurse.Visitor { | ||
@@ -71,3 +72,3 @@ static isPattern(node) { | ||
topLevel: pattern === this.rootPattern, | ||
rest: lastRestElement !== null && lastRestElement !== undefined && lastRestElement.argument === pattern, | ||
rest: lastRestElement !== null && lastRestElement !== void 0 && lastRestElement.argument === pattern, | ||
assignments: this.assignments | ||
@@ -74,0 +75,0 @@ }); |
@@ -25,5 +25,2 @@ /* | ||
/* eslint-disable no-underscore-dangle */ | ||
/* eslint-disable no-undefined */ | ||
import estraverse from "estraverse"; | ||
@@ -55,3 +52,3 @@ import esrecurse from "esrecurse"; | ||
// Process the right hand nodes recursively. | ||
if (referencer !== null && referencer !== undefined) { | ||
if (referencer !== null && referencer !== void 0) { | ||
visitor.rightHandNodes.forEach(referencer.visit, referencer); | ||
@@ -67,2 +64,5 @@ } | ||
/** | ||
* Visitor for import specifiers. | ||
*/ | ||
class Importer extends esrecurse.Visitor { | ||
@@ -114,3 +114,5 @@ constructor(declaration, referencer) { | ||
// Referencing variables and creating bindings. | ||
/** | ||
* Referencing variables and creating bindings. | ||
*/ | ||
class Referencer extends esrecurse.Visitor { | ||
@@ -439,3 +441,3 @@ constructor(options, scopeManager) { | ||
// eslint-disable-next-line class-methods-use-this | ||
// eslint-disable-next-line class-methods-use-this -- Desired as instance method | ||
PrivateIdentifier() { | ||
@@ -490,5 +492,5 @@ | ||
BreakStatement() {} // eslint-disable-line class-methods-use-this | ||
BreakStatement() {} // eslint-disable-line class-methods-use-this -- Desired as instance method | ||
ContinueStatement() {} // eslint-disable-line class-methods-use-this | ||
ContinueStatement() {} // eslint-disable-line class-methods-use-this -- Desired as instance method | ||
@@ -652,3 +654,3 @@ LabeledStatement(node) { | ||
MetaProperty() { // eslint-disable-line class-methods-use-this | ||
MetaProperty() { // eslint-disable-line class-methods-use-this -- Desired as instance method | ||
@@ -655,0 +657,0 @@ // do nothing. |
@@ -25,4 +25,2 @@ /* | ||
/* eslint-disable no-underscore-dangle */ | ||
import { | ||
@@ -184,5 +182,5 @@ BlockScope, | ||
attach() { } // eslint-disable-line class-methods-use-this | ||
attach() { } // eslint-disable-line class-methods-use-this -- Desired as instance method | ||
detach() { } // eslint-disable-line class-methods-use-this | ||
detach() { } // eslint-disable-line class-methods-use-this -- Desired as instance method | ||
@@ -189,0 +187,0 @@ __nestScope(scope) { |
@@ -25,5 +25,2 @@ /* | ||
/* eslint-disable no-underscore-dangle */ | ||
/* eslint-disable no-undefined */ | ||
import estraverse from "estraverse"; | ||
@@ -164,3 +161,4 @@ | ||
* boolean }</code>. | ||
* @member {Map} Scope#taints */ | ||
* @member {Map} Scope#taints | ||
*/ | ||
this.taints = new Map(); | ||
@@ -344,3 +342,3 @@ | ||
// References in default parameters isn't resolved to variables which are in their function body. | ||
__isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars | ||
__isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars -- Desired as instance method with signature | ||
return true; | ||
@@ -379,3 +377,3 @@ } | ||
__addDeclaredVariablesOfNode(variable, node) { | ||
if (node === null || node === undefined) { | ||
if (node === null || node === void 0) { | ||
return; | ||
@@ -386,7 +384,7 @@ } | ||
if (variables === null || variables === undefined) { | ||
if (variables === null || variables === void 0) { | ||
variables = []; | ||
this.__declaredVariables.set(node, variables); | ||
} | ||
if (variables.indexOf(variable) === -1) { | ||
if (!variables.includes(variable)) { | ||
variables.push(variable); | ||
@@ -498,3 +496,3 @@ } | ||
*/ | ||
isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this | ||
isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this -- Desired as instance method | ||
return true; | ||
@@ -508,3 +506,3 @@ } | ||
*/ | ||
isThisMaterialized() { // eslint-disable-line class-methods-use-this | ||
isThisMaterialized() { // eslint-disable-line class-methods-use-this -- Desired as instance method | ||
return true; | ||
@@ -526,2 +524,5 @@ } | ||
/** | ||
* Global scope. | ||
*/ | ||
class GlobalScope extends Scope { | ||
@@ -588,2 +589,5 @@ constructor(scopeManager, block) { | ||
/** | ||
* Module scope. | ||
*/ | ||
class ModuleScope extends Scope { | ||
@@ -595,2 +599,5 @@ constructor(scopeManager, upperScope, block) { | ||
/** | ||
* Function expression name scope. | ||
*/ | ||
class FunctionExpressionNameScope extends Scope { | ||
@@ -612,2 +619,5 @@ constructor(scopeManager, upperScope, block) { | ||
/** | ||
* Catch scope. | ||
*/ | ||
class CatchScope extends Scope { | ||
@@ -619,2 +629,5 @@ constructor(scopeManager, upperScope, block) { | ||
/** | ||
* With statement scope. | ||
*/ | ||
class WithScope extends Scope { | ||
@@ -642,2 +655,5 @@ constructor(scopeManager, upperScope, block) { | ||
/** | ||
* Block scope. | ||
*/ | ||
class BlockScope extends Scope { | ||
@@ -649,2 +665,5 @@ constructor(scopeManager, upperScope, block) { | ||
/** | ||
* Switch scope. | ||
*/ | ||
class SwitchScope extends Scope { | ||
@@ -656,2 +675,5 @@ constructor(scopeManager, upperScope, block) { | ||
/** | ||
* Function scope. | ||
*/ | ||
class FunctionScope extends Scope { | ||
@@ -734,2 +756,5 @@ constructor(scopeManager, upperScope, block, isMethodDefinition) { | ||
/** | ||
* Scope of for, for-in, and for-of statements. | ||
*/ | ||
class ForScope extends Scope { | ||
@@ -741,2 +766,5 @@ constructor(scopeManager, upperScope, block) { | ||
/** | ||
* Class scope. | ||
*/ | ||
class ClassScope extends Scope { | ||
@@ -748,2 +776,5 @@ constructor(scopeManager, upperScope, block) { | ||
/** | ||
* Class field initializer scope. | ||
*/ | ||
class ClassFieldInitializerScope extends Scope { | ||
@@ -755,2 +786,5 @@ constructor(scopeManager, upperScope, block) { | ||
/** | ||
* Class static block scope. | ||
*/ | ||
class ClassStaticBlockScope extends Scope { | ||
@@ -757,0 +791,0 @@ constructor(scopeManager, upperScope, block) { |
@@ -1,3 +0,3 @@ | ||
const version = "8.0.0"; | ||
const version = "8.0.1"; | ||
export default version; |
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "8.0.0", | ||
"version": "8.0.1", | ||
"engines": { | ||
@@ -28,3 +28,3 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" | ||
"build:update-version": "node tools/update-version.js", | ||
"lint": "node Makefile.js lint", | ||
"lint": "eslint . --report-unused-disable-directives", | ||
"prelint": "npm run build", | ||
@@ -51,12 +51,12 @@ "prepublishOnly": "npm run build:update-version && npm run build", | ||
"devDependencies": { | ||
"@typescript-eslint/parser": "^4.28.1", | ||
"@typescript-eslint/parser": "^7.1.1", | ||
"c8": "^7.7.3", | ||
"chai": "^4.3.4", | ||
"eslint": "^7.29.0", | ||
"eslint-config-eslint": "^7.0.0", | ||
"eslint-plugin-jsdoc": "^35.4.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-eslint": "^9.0.0", | ||
"eslint-plugin-chai-friendly": "^0.7.4", | ||
"eslint-release": "^3.2.0", | ||
"eslint-visitor-keys": "^3.3.0", | ||
"espree": "^9.3.1", | ||
"eslint-visitor-keys": "^4.0.0", | ||
"espree": "^10.0.1", | ||
"globals": "^14.0.0", | ||
"mocha": "^9.0.1", | ||
@@ -66,4 +66,4 @@ "npm-license": "^0.3.3", | ||
"shelljs": "^0.8.4", | ||
"typescript": "^4.3.5" | ||
"typescript": "^5.4.2" | ||
} | ||
} |
@@ -80,2 +80,6 @@ [![npm version](https://img.shields.io/npm/v/eslint-scope.svg)](https://www.npmjs.com/package/eslint-scope) | ||
## Security Policy | ||
We work hard to ensure that ESLint Scope is safe for everyone and that security issues are addressed quickly and responsibly. Read the full [security policy](https://github.com/eslint/.github/blob/master/SECURITY.md). | ||
## Build Commands | ||
@@ -82,0 +86,0 @@ |
Sorry, the diff of this file is not supported yet
147977
3820
92