cem2ran/react-play

Highlight errors inline

Opened this issue · 0 comments

babel.transform() error messages contains the needed info.

try {
  babel.transform(code, {});
} catch ({loc}) {
   //loc contains the needed information.
}

Trivial to implement in CodeMirror:
editor.addLineClass( lineNumber, 'background', 'errorLine' )