Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more →
Socket
Socket
Log inDemoInstall

@typescript-eslint/eslint-plugin

Package Overview
Dependencies
116
Maintainers
2
Versions
3149
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

@typescript-eslint/eslint-plugin

TypeScript plugin for ESLint

    6.13.2latest
    GitHub
    npm

Version published
Maintainers
2
Weekly downloads
24,872,642
decreased by-0.39%

Weekly downloads

Package description

What is @typescript-eslint/eslint-plugin?

The @typescript-eslint/eslint-plugin package is an ESLint plugin that contains a set of ESLint rules that are specifically designed for TypeScript code. It helps in identifying and reporting on patterns found in TypeScript code, and it can be used to enforce a wide range of coding standards and conventions.

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

Type-aware linting

This feature allows for rules that require type information. For example, the 'strict-boolean-expressions' rule ensures that boolean expressions are clear and error-free by considering the types involved in the expression.

/* eslint @typescript-eslint/strict-boolean-expressions: 'error' */
function isTruthy(value: any): boolean {
  return Boolean(value);
}

Code style enforcement

Enforces naming conventions for everything from variables to type parameters. This example enforces camelCase naming for variables.

/* eslint @typescript-eslint/naming-convention: ['error', { 'selector': 'variable', 'format': ['camelCase'] }] */
let myVariable = 1;

Accessibility checks

This feature requires functions and methods to explicitly define their return type to improve code readability and maintainability.

/* eslint @typescript-eslint/explicit-function-return-type: 'warn' */
function add(x: number, y: number) {
  return x + y;
}

Other packages similar to @typescript-eslint/eslint-plugin

Changelog

Source

6.13.2 (2023-12-04)

Note: Version bump only for package @typescript-eslint/typescript-eslint

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

Readme

Source

@typescript-eslint/eslint-plugin

An ESLint plugin which provides lint rules for TypeScript codebases.

NPM Version NPM Downloads

šŸ‘‰ See https://typescript-eslint.io/getting-started for our Getting Started docs.

See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.

Keywords

FAQs

Last updated on 04 Dec 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
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • 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