tscircuit / snippets

The main website, playground and online development environment for tscircuit (React Electronics)
https://tscircuit.com
MIT License
8 stars 20 forks source link

When you run after a React syntax error, give a good syntax error message in the errors panel #215

Open seveibar opened 2 hours ago

seveibar commented 2 hours ago

Image

Maybe babel can help us get a good syntax error, not sure.

/bounty $15

algora-pbc[bot] commented 2 hours ago

💎 $15 bounty • tscircuit

Steps to solve:

  1. Start working: Comment /attempt #215 with your implementation plan
  2. Submit work: Create a pull request including /claim #215 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to tscircuit/snippets!

Add a bounty • Share on socials

Attempt Started (GMT+0) Solution
🟢 @kom-senapati Nov 15, 2024, 4:21:43 AM #218
kom-senapati commented 20 minutes ago

/attempt #215

Creating an util at src/lib/utils/getSyntaxError.ts which checks the code and gives syntax errors by using babel Using this util at src/hooks/use-run-tsx/index.tsx to return error as message

Algora profile Completed bounties Tech Active attempts Options
@kom-senapati 1 bounty from 1 project
HTML, JavaScript,
Python & more
Cancel attempt
algora-pbc[bot] commented 9 minutes ago

💡 @kom-senapati submitted a pull request that claims the bounty. You can visit your bounty board to reward.