Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@typescript-eslint/types
Advanced tools
The @typescript-eslint/types package is part of the TypeScript-ESLint project, which provides a TypeScript parser for ESLint and utilities for working with TypeScript and ESLint together. This specific package contains TypeScript definitions for ESLint-specific types, making it easier to work with ESLint configurations, rules, and plugins in a TypeScript environment. It is primarily used by developers who are creating custom ESLint rules or configurations and want to leverage TypeScript's type-checking capabilities for better development experience.
AST Node Types
Provides TypeScript interfaces for AST nodes generated by the parser. This is useful for writing type-safe code that inspects or manipulates the AST, such as custom ESLint rules.
import { TSESTree } from '@typescript-eslint/types';
function processNode(node: TSESTree.Node) {
if (node.type === 'Identifier') {
console.log('Found an identifier:', node.name);
}
}
Rule Definition Helpers
Includes types for defining ESLint rules in a TypeScript-friendly way, making it easier to create custom rules with type safety.
import { TSESLint } from '@typescript-eslint/types';
const myRule: TSESLint.RuleModule<'my-error', []> = {
meta: {
type: 'problem',
docs: {
description: 'My custom rule',
recommended: 'error'
}
},
create(context) {
return {
Identifier(node) {
context.report({
node,
messageId: 'my-error'
});
}
};
}
};
This package provides a set of utilities for working with TypeScript and ESLint, including ESLint rule helpers and AST utilities. It is similar to @typescript-eslint/types but offers a broader range of tools for rule development and AST manipulation.
An older package that aimed to add TypeScript support to ESLint before the official @typescript-eslint project was established. It provides some similar functionalities but is now deprecated in favor of the more comprehensive and up-to-date @typescript-eslint suite of packages.
@typescript-eslint/types
Types for the TypeScript-ESTree AST spec
This package exists to help us reduce cycles and provide lighter-weight packages at runtime.
This is an internal package to the typescript-eslint monorepo. You likely don't want to use it directly.
š See https://typescript-eslint.io for docs on typescript-eslint.
8.7.0 (2024-09-23)
export *
exports to see if all exported members are types (#10006)getStaticMemberAccessValue
(#10004)NewExpression
as a parent of SpreadElement
(#10024)You can read about our versioning strategy and releases on our website.
FAQs
Types for the TypeScript-ESTree AST spec
The npm package @typescript-eslint/types receives a total of 35,174,315 weekly downloads. As such, @typescript-eslint/types popularity was classified as popular.
We found that @typescript-eslint/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 2 open source maintainers 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.