⭐ Suggestion
It would be nice if there were a CLI command and / or way in VSCode to open a rule and the error that triggered it in the playground.
For example, maybe the command is:
ast-grep open-playground --file ./something.ts --rule some-rule-id # Errors show the path and the rule ID,
# not the rule file location.
# Also I don't like this command name, it's just an example. Might be nice to put it under a 'debug' command group or something.
The command would use open and open the link in the browser.
💻 Use Cases
Sometimes when there's an error brought up by a rule I want to be able to open the playground with the rule and the code file to see what's going on. I can do this manually, but it'd be nice if there was a shortcut.
Testing Library has this as a feature, where if you add screen.logTestingPlaygroundURL() to a test it will output a clickable URL to the testing library playground.
⭐ Suggestion
It would be nice if there were a CLI command and / or way in VSCode to open a rule and the error that triggered it in the playground.
For example, maybe the command is:
The command would use
openand open the link in the browser.💻 Use Cases
Sometimes when there's an error brought up by a rule I want to be able to open the playground with the rule and the code file to see what's going on. I can do this manually, but it'd be nice if there was a shortcut.
Testing Library has this as a feature, where if you add
screen.logTestingPlaygroundURL()to a test it will output a clickable URL to the testing library playground.