# airbnb/ts-migrate

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/airbnb-ts-migrate).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

5,620 stars · 232 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/airbnb/ts-migrate
- awesome-repositories: https://awesome-repositories.com/repository/airbnb-ts-migrate.md

## Topics

`codemod` `javascript` `migration` `typescript`

## Description

ts-migrate is an automated migration tool designed to transform JavaScript source code into compiling TypeScript files. It functions as a code migration framework that uses abstract syntax trees to perform large-scale refactoring and structural changes across a project.

The tool provides a customizable framework for defining plugin-based transformation rules, allowing for the automation of specific code changes. It includes specialized engines for converting JSDoc type definitions into native TypeScript annotations and a utility for suppressing compiler errors by inserting type assertions or ignore comments.

The system covers a broad range of migration capabilities, including the conversion of React property types and lifecycle methods, the normalization of class definitions, and the ability to target specific directories incrementally through pattern-based filtering.

## Tags

### Development Tools & Productivity

- [JavaScript to TypeScript Migration](https://awesome-repositories.com/f/development-tools-productivity/javascript-and-typescript-build-systems/javascript-to-typescript-migration.md) — Automates the conversion of existing JavaScript codebases into compiling TypeScript files.
- [AST-Based Source Transformations](https://awesome-repositories.com/f/development-tools-productivity/ast-transformation-tools/ast-to-source-conversion/ast-based-source-transformations.md) — Provides programmatic modification of source code by replacing matched syntax tree nodes while preserving original formatting.
- [Code Transformation Plugin Systems](https://awesome-repositories.com/f/development-tools-productivity/code-completion/editor-code-completion-plugins/code-transformation-plugin-systems.md) — Ships a system for transforming source code using tree-based logic or text replacements via plugins. ([source](https://github.com/airbnb/ts-migrate/blob/master/packages/ts-migrate-example))
- [Code Migration Frameworks](https://awesome-repositories.com/f/development-tools-productivity/code-migration-frameworks.md) — Provides a customizable framework for defining plugin-based transformation rules to automate code changes during migration.
- [Glob Pattern Selectors](https://awesome-repositories.com/f/development-tools-productivity/file-pattern-matching/regex-based-file-selection/glob-pattern-selectors.md) — Uses wildcard glob patterns to select specific files for bulk migration operations.
- [Incremental](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/migration-tools/incremental.md) — Facilitates the gradual conversion of large codebases by targeting specific directories and files via patterns. ([source](https://github.com/airbnb/ts-migrate/blob/master/packages/ts-migrate))

### Programming Languages & Runtimes

- [Language Migration Automation](https://awesome-repositories.com/f/programming-languages-runtimes/language-migration-automation.md) — Automates the conversion of entire codebases from JavaScript to TypeScript while preserving project structure. ([source](https://github.com/airbnb/ts-migrate/blob/master/packages/ts-migrate))
- [TypeScript Source Transformers](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-compilers/source-code-templates/source-code-transformation-engines/typescript-source-transformers.md) — Uses AST manipulation to programmatically transform JavaScript and partial TypeScript files into valid, compiling code. ([source](https://github.com/airbnb/ts-migrate/blob/master/README.md))
- [Normalization](https://awesome-repositories.com/f/programming-languages-runtimes/class-definitions/normalization.md) — Provides automated reorganization of class members and accessibility modifiers to standardize class definitions during migration. ([source](https://github.com/airbnb/ts-migrate/blob/master/packages/ts-migrate-plugins))
- [Framework Integration](https://awesome-repositories.com/f/programming-languages-runtimes/type-annotations/type-annotations/framework-integration.md) — Transforms React property types, state, and lifecycle methods into native TypeScript type definitions. ([source](https://github.com/airbnb/ts-migrate/blob/master/packages/ts-migrate-plugins))

### Software Engineering & Architecture

- [AST-Based Refactorers](https://awesome-repositories.com/f/software-engineering-architecture/abstract-syntax-tree-tools/internal-tree-representations/ast-based-refactorers.md) — Programmatically modifies internal syntax trees to apply large-scale refactoring and renders them back to source code.
- [JSDoc to TypeScript Converters](https://awesome-repositories.com/f/software-engineering-architecture/api-documentation-generators/jsdoc-annotation-generators/jsdoc-to-typescript-converters.md) — Parses documentation comments and converts JSDoc type definitions into native TypeScript annotations.
- [Type Conversion](https://awesome-repositories.com/f/software-engineering-architecture/api-documentation-generators/jsdoc-annotation-generators/type-conversion.md) — Extracts type information from JSDoc comments and converts them into native TypeScript annotations. ([source](https://github.com/airbnb/ts-migrate/blob/master/packages/ts-migrate-plugins))
- [Automated Error Resolutions](https://awesome-repositories.com/f/software-engineering-architecture/error-reporting/custom-error-interfaces/compiler-error-emissions/automated-error-resolutions.md) — Analyzes TypeScript compiler output to automatically insert type assertions or suppression comments.
- [Large-Scale Code Migrations](https://awesome-repositories.com/f/software-engineering-architecture/large-scale-code-migrations.md) — Performs systematic, project-wide automated rewrites to migrate legacy syntax to TypeScript standards.
- [Automated Suppression](https://awesome-repositories.com/f/software-engineering-architecture/large-scale-type-maintenance/automated-suppression.md) — Automatically inserts type-ignore comments and assertions to resolve remaining compiler errors and ensure the project compiles. ([source](https://github.com/airbnb/ts-migrate/blob/master/packages/ts-migrate))
- [Migration Rule Plugins](https://awesome-repositories.com/f/software-engineering-architecture/plugin-based-logic-extensions/migration-rule-plugins.md) — Employs a modular system of custom rules to automate specific code conversions across a codebase.
- [TypeScript Annotation Conversion](https://awesome-repositories.com/f/software-engineering-architecture/schema-metadata-utilities/schema-metadata-definitions/jsdoc-to-schema-annotations/typescript-annotation-conversion.md) — Extracts type information from documentation comments and converts them into native TypeScript annotations.
- [Typed Error Management](https://awesome-repositories.com/f/software-engineering-architecture/typed-error-management.md) — Implements automated systems to clear remaining type errors through assertions and ignore comments. ([source](https://github.com/airbnb/ts-migrate/blob/master/packages/ts-migrate-plugins))
- [TypeScript Compilation Fixes](https://awesome-repositories.com/f/software-engineering-architecture/typescript-compilation-fixes.md) — Provides automated systems for identifying and resolving TypeScript type errors to ensure successful builds.
- [Transformation Logic Extensions](https://awesome-repositories.com/f/software-engineering-architecture/plugin-based-logic-extensions/transformation-logic-extensions.md) — Enables building custom transformation plugins using text-based tools or AST implementations. ([source](https://github.com/airbnb/ts-migrate/blob/master/packages/ts-migrate-plugins))
- [Syntax Tree Transformers](https://awesome-repositories.com/f/software-engineering-architecture/trees/syntax-tree-construction/syntax-tree-transformers.md) — Modifies syntax trees to reorganize class members and apply accessibility modifiers.

### Part of an Awesome List

- [Customizable Transformation Rules](https://awesome-repositories.com/f/awesome-lists/ai/clinical-decision-support/customizable-rule-engines/customizable-transformation-rules.md) — Allows defining specific transformation logic and configurations to fit different project requirements. ([source](https://github.com/airbnb/ts-migrate#readme))

### Web Development

- [React TypeScript Migrations](https://awesome-repositories.com/f/web-development/react-typescript-migrations.md) — Updates React components and lifecycle methods from JavaScript to native TypeScript type definitions.
