Socket
Socket
Sign inDemoInstall

@typescript-eslint/experimental-utils

Package Overview
Dependencies
126
Maintainers
1
Versions
2612
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/experimental-utils

(Experimental) Utilities for working with TypeScript + ESLint together


Version published
Maintainers
1
Weekly downloads
10,086,581
decreased by-10.29%

Weekly downloads

Package description

What is @typescript-eslint/experimental-utils?

The @typescript-eslint/experimental-utils package provides various utilities for working with TypeScript and ESLint. It is part of the TypeScript ESLint project, which aims to enable ESLint to support TypeScript. The utilities in this package are considered experimental and are primarily intended for use by developers creating custom ESLint rules for TypeScript codebases.

What are @typescript-eslint/experimental-utils's main functionalities?

AST Utilities

Provides utility functions to work with Abstract Syntax Trees (AST), such as checking if a node is an identifier.

const { ASTUtils } = require('@typescript-eslint/experimental-utils');
const { isIdentifier } = ASTUtils;

ESLint Rule Creation

Facilitates the creation of custom ESLint rules with TypeScript support, including a rule creator function that helps define metadata for rules.

const { ESLintUtils } = require('@typescript-eslint/experimental-utils');
const createRule = ESLintUtils.RuleCreator(name => `https://example.com/rule/${name}`);

Type Information

Provides utilities to retrieve type information from TypeScript code, which can be used in custom ESLint rules to perform type-aware linting.

const { TypeScriptUtils } = require('@typescript-eslint/experimental-utils');
const { getParserServices } = TypeScriptUtils;
const parserServices = getParserServices(context);
const checker = parserServices.program.getTypeChecker();

Other packages similar to @typescript-eslint/experimental-utils

Readme

Source

@typescript-eslint/experimental-utils

Utilities for working with TypeScript + ESLint together.

NPM Version NPM Downloads

Note

This package is purely a re-export of @typescript-eslint/utils. You should switch to importing from that non-experimental package instead.

- import { RuleCreator } from '@typescript-eslint/experimental-utils';
+ import { RuleCreator } from '@typescript-eslint/utils';

⚠ A future major version of this old package will console.warn to ask you to switch.

Contributing

See the contributing guide here

Keywords

FAQs

Last updated on 31 Jan 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc