Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@types/eslint-visitor-keys
Advanced tools
Stub TypeScript definitions entry for eslint-visitor-keys, which provides its own types definitions
The @types/eslint-visitor-keys package provides TypeScript type definitions for eslint-visitor-keys, which is a utility used by ESLint to determine the keys to visit on an AST (Abstract Syntax Tree) node. This package is essential for TypeScript users who are working with ESLint custom rules or plugins and need to ensure type safety and autocompletion when dealing with visitor keys.
Type Definitions for Visitor Keys
This feature provides TypeScript type definitions for defining visitor keys. It allows developers to specify which properties of AST nodes should be visited by ESLint rules. The code sample demonstrates how to define visitor keys for `Program` and `CallExpression` nodes.
import { VisitorKeys } from '@types/eslint-visitor-keys';
const visitorKeys: VisitorKeys = {
Program: ['body'],
CallExpression: ['callee', 'arguments']
};
This package is part of the TypeScript ESLint project and provides a parser that converts TypeScript code into an ESTree-compatible form. It is similar to @types/eslint-visitor-keys in that it deals with AST nodes, but it focuses more on parsing rather than defining visitor keys.
The core ESLint package itself is related to @types/eslint-visitor-keys as it uses visitor keys to traverse the AST and check for linting errors. However, ESLint is a comprehensive linting tool, whereas @types/eslint-visitor-keys specifically provides TypeScript types for the visitor keys.
This is a stub types definition for @types/eslint-visitor-keys (https://github.com/eslint/js/blob/main/packages/eslint-visitor-keys/README.md).
eslint-visitor-keys provides its own type definitions, so you don't need @types/eslint-visitor-keys installed!
FAQs
Stub TypeScript definitions entry for eslint-visitor-keys, which provides its own types definitions
We found that @types/eslint-visitor-keys demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.