Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@types/eslint-visitor-keys
Advanced tools
TypeScript definitions for eslint-visitor-keys
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.
npm install --save @types/eslint-visitor-keys
This package contains type definitions for eslint-visitor-keys (https://github.com/eslint/eslint-visitor-keys#readme).
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint-visitor-keys
Additional Details
These definitions were written by Toru Nagashima https://github.com/mysticatea.
FAQs
Stub TypeScript definitions entry for eslint-visitor-keys, which provides its own types definitions
We found that @types/eslint-visitor-keys demonstrated a not healthy version release cadence and project activity because the last version was released 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.