Khan / Khan/live-editor

Live Editor should give warning for template literals

Open
#629 11 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
776
Forks
180
PR merge metrics
No merged PRs in 30d

Description

Currently, if you use a template literal in the live editor Oh Noes will display an error like so:
**Unexpected \`.**

Here's an example: https://www.khanacademy.org/computer-programming/template-literal-test/5513940759543808

Instead, it should accept the template literal syntax without a parser error and instead spit out a warning similar to other ones displayed when ES6 features are being used. e.g.:
```
'template literal syntax (``)' is only available in ES6 which is not supported by this environment.
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the parser error in the linked template-literal example and trace how the live editor handles ES6 syntax warnings. Compare the existing warning messages with the requested template-literal warning; done means the syntax no longer produces a parser error and instead displays an ES6 unsupported warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.