Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-module-utils

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-module-utils - npm Package Compare versions

Comparing version 2.10.0 to 2.11.0

5

CHANGELOG.md

@@ -8,2 +8,7 @@ # Change Log

## v2.11.0 - 2024-09-05
### New
- `declaredScope`: take a `node` for modern eslint versions (thanks [@michaelfaith])
## v2.10.0 - 2024-09-05

@@ -10,0 +15,0 @@

4

declaredScope.d.ts
import { Rule, Scope } from 'eslint';
import * as ESTree from 'estree';
declare function declaredScope(
context: Rule.RuleContext,
name: string
name: string,
node?: ESTree.Node,
): Scope.Scope['type'] | undefined;
export default declaredScope;

@@ -5,5 +5,7 @@ 'use strict';

const { getScope } = require('./contextCompat');
/** @type {import('./declaredScope').default} */
exports.default = function declaredScope(context, name) {
const references = context.getScope().references;
exports.default = function declaredScope(context, name, node) {
const references = (node ? getScope(context, node) : context.getScope()).references;
const reference = references.find((x) => x.identifier.name === name);

@@ -10,0 +12,0 @@ if (!reference || !reference.resolved) { return undefined; }

{
"name": "eslint-module-utils",
"version": "2.10.0",
"version": "2.11.0",
"description": "Core utilities to support eslint-plugin-import and other module-related plugins.",

@@ -5,0 +5,0 @@ "engines": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc