• React/Create Element To Jsx

    This codemod transforms React.createElement calls into JSX syntax, making your code more readable and maintainable.

  • Sveltekit Vite Preprocess Migration

    This codemod updates import paths and ensures compatibility with changes in library structures. In this example, it modifies the import statement for vitePreprocess to reflect updates in the library's API.

  • Sveltekit Import And Path Simplification

    This codemod simplifies the import statements and path resolution in your SvelteKit project. It replaces the usage of resolvePath and concatenation with base by using the resolveRoute function from $app/paths. This results in cleaner and more readable code.

  • Goto To Location Href

    Codemod Description

    This codemod is designed to replace specific patterns in TypeScript files with updated code logic. It transforms instances of goto($A) into window.location.href = $A; when the $A value is a URL starting with http:// or https://. This refactor makes external navigation more explicit by using window.location.href.

  • Dynamic To Static Env Transformer

    This codemod transforms import {$A} from '$env/dynamic/public'; and import {$A} from '$env/dynamic/private'; into their static counterparts, replacing them with import {$A} from '$env/static/public'; and import {$A} from '$env/static/private';, respectively. It ensures compatibility for prerendered pages and static deployments.

  • Add Status To Error Handling

    This codemod improves error handling in SvelteKit by updating the way errors are returned in the load function. In SvelteKit 1, errors were handled inconsistently, often missing the status property or failing to trigger the handleError hook. SvelteKit 2 standardizes error handling by automatically including the status and message properties in error responses.

  • Add Multipart Enctype To Forms With File Input

    This codemod automatically adds the enctype="multipart/form-data" attribute to forms containing file input fields. It ensures that forms with file inputs properly handle file uploads during non-JS submissions, which is a requirement for SvelteKit v2.

  • Add Cookie Path To All Methods

    This codemod adds { path: '/' } to all cookies method calls in your TypeScript project. It ensures that cookies are set, deleted, or serialized with the correct path specified, which helps in consistent cookie handling across different environments.

  • Replace Throw With Error Call

    This codemod simplifies error handling and redirects in your TypeScript project by replacing throw error() and throw redirect() statements with direct calls to error() and redirect(). This change aligns with modern practices and results in cleaner, more readable code.

  • React/Update React Imports

    This codemod transforms React imports to use named imports instead of default or namespace imports. This helps reduce bundle size by allowing better tree-shaking of unused React exports.

  • Import Change Js To Ts Extensions

    This codemod changes .js to .ts file extension in relative, top-level imports. If no .js file extension was previously used, it adds .ts file extension instead.

  • Import Add Js Extensions

    This codemod adds .js file extension to relative, top-level imports.

  • Rename Deno Interfaces

    This codemod renames Deno typscript interface names in your codebase to their new names.

  • Deno Rewrite Custom Inspect

    This codemod replaces occurrences of Deno.customInspect with Symbol.for("Deno.customInspect"). This change aligns with the new standard for defining custom inspection behavior in Deno, providing better interoperability with JavaScript's built-in features.

  • Deno Replace Window With GlobalThis

    This codemod transforms instances of the window identifier into globalThis.

  • Deno Refactor TLS Certs Reading

    This codemod updates the usage of TLS certificate loading in Deno by replacing deprecated properties with their new counterparts. In Deno V2, loading certificates directly from files is now deprecated. Instead, you should read the certificates yourself.

  • Deno Refactor Resource Ids

    In Deno v2, resource IDs are being deprecated. Most users do not directly interact with resource IDs, so we are moving towards a model where resources are referenced by native JavaScript objects. This codemod automates the process of updating your code to align with this change.

  • Deno Import STL Types

    This codemod updates deprecated Deno typescript interfaces in your codebase. It automatically imports the necessary typscript interfaces from the standard library

  • Deno Import Stl Functions

    This codemod updates removed Deno function calls in Deno v2 to their new equivalents from the standard library It also automatically adds the necessary import statements from the appropriate modules.

  • Vue 2 To Vue 3 Refs And Methods

    Example

    This codemod turns X into Y. It also does Z. Note: this is a contrived example. Please modify it.