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.
- ESLint Find and fix problems in your JavaScript code.
- angular-eslint ESLint support, rules and tooling for Angular projects
- eslint-plugin-unicorn More than 300 powerful ESLint rules
- Oxc The JavaScript Oxidation Compiler: high-performance JavaScript and TypeScript tools in Rust
- eslint-plugin-jsdoc JSDoc linting rules for ESLint.
- eslint-plugin-vue The official ESLint plugin for Vue.js
