talira

typescript-eslint

The tooling that lets ESLint and Prettier lint and read TypeScript

open sourceMITfree

typescript-eslint makes ESLint and other JavaScript tools such as Prettier work with TypeScript syntax. It provides the parser that turns TypeScript source into an ESTree-compatible tree, over 100 lint rules for best practices, likely bugs and stylistic consistency, and typed linting: rules that use TypeScript's type checker for deeper analysis, such as catching unhandled promises. Most projects install the typescript-eslint package, which exports ready-made ESLint configs and brings the parser and plugin with it; a rule tester and utilities help people write their own rules. It is MIT-licensed and maintained by an independent volunteer team.

Problems it solves

  • lint my TypeScript code with ESLint
  • catch floating promises and unsafe any in TypeScript
  • migrate from TSLint to ESLint
  • write a custom ESLint rule that understands TypeScript types
  • make ESLint stop failing to parse TypeScript syntax

Features

  • parser that lets ESLint lint TypeScript source code
  • over 100 lint rules for TypeScript and modern JavaScript
  • typed linting rules that use the TypeScript type checker
  • shareable ESLint flat configs: recommended, strict and stylistic, with type-aware variants
  • rule tester and utilities for writing custom ESLint rules
  • online playground for trying rules

Alternatives

The same job

These do what typescript-eslint does.

  1. ESLint Find and fix problems in your JavaScript code.
  2. angular-eslint ESLint support, rules and tooling for Angular projects
  3. eslint-plugin-unicorn More than 300 powerful ESLint rules
  4. Oxc The JavaScript Oxidation Compiler: high-performance JavaScript and TypeScript tools in Rust
  5. eslint-plugin-jsdoc JSDoc linting rules for ESLint.
  6. eslint-plugin-vue The official ESLint plugin for Vue.js

Compare typescript-eslint with the top 3