# typescript-eslint — TypeScript Support for ESLint > The tooling that enables ESLint to lint and auto-fix TypeScript code with full type-aware analysis and over 100 TypeScript-specific rules. ## Install Save as a script file and run: # typescript-eslint ## Quick Use ```bash npm install -D typescript-eslint ``` ```js // eslint.config.mjs import tseslint from 'typescript-eslint'; export default tseslint.config( ...tseslint.configs.recommended, ); ``` ## Introduction typescript-eslint is the project that makes ESLint and TypeScript work together. It provides the parser, plugin, and rule sets that let you lint TypeScript code with full type information, catching bugs that the TypeScript compiler alone does not flag. ## What typescript-eslint Does - Parses TypeScript and TSX files into an ESLint-compatible AST - Provides over 100 TypeScript-specific lint rules for common mistakes - Enables type-aware rules that use the TypeScript compiler API for deep analysis - Ships preset configurations from recommended to strict for quick setup - Supports ESLint flat config and legacy config formats ## Architecture Overview The project consists of three packages: the parser converts TypeScript source into an ESTree-compatible AST, the plugin exposes TypeScript-specific rules, and the utils package provides helpers for rule authors. Type-aware rules access the TypeScript type checker through a services bridge, enabling analysis that plain AST rules cannot perform. ## Self-Hosting & Configuration - Install the typescript-eslint package which bundles parser, plugin, and configs - Use the flat config format with tseslint.config() for ESLint v9 and later - Enable type-aware linting by adding parserOptions.project pointing to tsconfig - Extend preset configs like recommended, strict, or stylistic based on team preference - Configure individual rules in the rules object to match your coding standards ## Key Features - Type-aware analysis catches async errors, type mismatches, and unsafe any usage - Preset configurations from lenient to strict for progressive adoption - Full support for ESLint flat config and shared config extension - Automatic fixing for many rules including type imports and naming conventions - Active maintenance with regular releases aligned to TypeScript and ESLint updates ## Comparison with Similar Tools - **ESLint** — core linter for JavaScript; typescript-eslint extends it to TypeScript - **Biome** — all-in-one linter and formatter; typescript-eslint integrates with the ESLint ecosystem - **TSLint** — deprecated TypeScript linter; typescript-eslint is its official successor - **Oxlint** — Rust-based fast linter; typescript-eslint offers deeper type-aware analysis - **Prettier** — code formatter only; typescript-eslint is a linter with optional style rules ## FAQ **Q: Do I still need ESLint if I use typescript-eslint?** A: Yes. typescript-eslint is a plugin and parser for ESLint, not a standalone tool. **Q: Does type-aware linting slow down my editor?** A: It adds some overhead since it runs the TypeScript type checker. Most projects see acceptable performance with project references. **Q: Can I use it with JavaScript files too?** A: Yes. The parser handles both TypeScript and JavaScript, and many rules apply to both. **Q: Should I migrate from TSLint?** A: Yes. TSLint is deprecated and typescript-eslint is the officially recommended replacement. ## Sources - https://github.com/typescript-eslint/typescript-eslint - https://typescript-eslint.io --- Source: https://tokrepo.com/en/workflows/asset-6d74a45b Author: Script Depot