jscodeshift
jscodeshift copied to clipboard
A JavaScript codemod toolkit.
for instance:  Sometimes we may not need to change the ast, but traverse the ast to collect some required content. I know that there are many libraries that can...
Given an input: ``` class Bar extends Foo { override foo(); } ``` and a transform: ``` import { Transform } from 'jscodeshift'; const transform: Transform = (file, api) =>...
This link is broken:  
this example comes from some obfuscated code ```js function Os(n){ ... } ... const i = function t() { var e = Os; new MutationObserver((t=>{ var r = e; for...
For some reason Windows is throwing an error when converting a `FunctionDeclaration` to a `FunctionExpression`, while this is perfectly working (as expected) on Linux. As @mcansh pointed out in https://github.com/remix-run/remix/pull/3987#issuecomment-1218239753,...
Hello, I am using JScodeshift to make some changes in json with my [keycloak-capacitor](https://github.com/jy95/keycloak-capacitor/tree/jscodeshift-packageJson) project. ```tsx // Replace dependancies return mainRoot .find( j.Property, { key: { name: "dependancies" } }...
jscodeshift version: 0.13.0 node version: 16.13.0 command: ```shell npx jscodeshift -t src/transforms/sort-imports --extensions=ts,tsx --parser=tsx "${TRANSFORM_FILE}.ts" --print --dry ``` I'm using Typescript in a project running jscodeshift and I get the...
I'm using Jscodeshift to replace the following code in astexplorer testing, but I get different results using babel/ts ```ts export const systemCoreApi = wrapApiClient({ namespace: 'system' }) ``` use babel...
Now nodejs itself already has a glob package, why use shell, which is not very friendly to windows users. Even when using GitBash, the `**` syntax is not supported by...
This PR does two things: - updates docs using `npm run docs` - shows how to serve that folder locally using `npx http-server`, in the README.md