Socket
Socket
Sign inDemoInstall

@typescript-eslint/experimental-utils

Package Overview
Dependencies
125
Maintainers
2
Versions
2612
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

@typescript-eslint/experimental-utils

(Experimental) Utilities for working with TypeScript + ESLint together

    5.62.0latest
    GitHub
    npm

Version published
Maintainers
2
Weekly downloads
9,290,910
decreased by-15.19%

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

Changelog

Source

5.62.0 (2023-07-10)

Bug Fixes

  • eslint-plugin: [comma-spacing] allow no space after trailing comma in objects and arrays (#6938) (24bdacc)
  • eslint-plugin: [prefer-includes] escape special characters (#7161) (5a347a5), closes #7145
  • eslint-plugin: replace auto-fix of class literal property style rule with suggestion (#7054) (a8c824a)

Features

  • eslint-plugin: [prefer-nullish-coalescing] add ignorePrimitives option (#6487) (6edaa04)

You can read about our versioning strategy and releases on our website.

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 10 Jul 2023

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the 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