Replies: 1 comment
-
Hi, this is not possible using rule/cli at the moment. https://ast-grep.github.io/guide/api-usage/js-api.html is a good solution at the moment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way use the current filename in the rewrite expression?
Use case: I'd like to replace some default exports with named exports (in a TS codebase), with the name coming from filename.
For example, when processing file
/path/to/somefile.ts
it would givesomefile
.Beta Was this translation helpful? Give feedback.
All reactions