benjamn / benjamn/recast

add "console.log <class>.<method>" to top of function

Open
#522 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.3k
Forks
363
Avg merge
3d 8h
Merged PRs (30d)
3

Description

I'm trying to add logging to methods much like I could do with esprima (code [here](https://gist.github.com/50e1901c66971a9ab0a4562607479e06)), but esprima doesn't like arrow constructs. recast parses the [source](https://gist.github.com/a25c3069b3cef507b7fc9009e4e8860f) no problem but I don't know how to add code to the AST.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked esprima and recast source examples to understand the requested transformation and how arrow constructs are represented. Determine how a console.log entry naming the class and method could be added to the AST, then verify that the transformed source preserves the requested logging behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.