Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skovy/typescript-codemod-examples
Examples of code audits and code transforms (codemods) written in TypeScript
https://github.com/skovy/typescript-codemod-examples
abstract-syntax-tree audit babel codemod jscodeshift typescript
Last synced: 1 day ago
JSON representation
Examples of code audits and code transforms (codemods) written in TypeScript
- Host: GitHub
- URL: https://github.com/skovy/typescript-codemod-examples
- Owner: skovy
- Created: 2020-12-09T05:02:00.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-18T21:01:11.000Z (about 4 years ago)
- Last Synced: 2024-12-07T00:08:41.459Z (about 2 months ago)
- Topics: abstract-syntax-tree, audit, babel, codemod, jscodeshift, typescript
- Language: TypeScript
- Homepage: https://skovy.dev/codemod-workflow
- Size: 34.2 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Audit: audit.ts
Awesome Lists containing this project
README
# TypeScript Codemod Examples
This repository contains a basic sample codebase
dealing with brewing coffee. This codebase can then
be audited and codemodded:- `yarn run audit` - executes `audit.ts`
- `yarn codemod` - executes `transform.ts`This code audit and codemod are written in TypeScript
to take advantage of the type-safety. Particularly,
making sure the AST `node` properties are properly narrowed
by it's `type` to prevent runtime errors.This is the complete code used in the blog post
covering this in more depth: https://skovy.dev/codemod-workflow