PreReq scripts and Test scripts now use JSEditor

This commit is contained in:
Andrew Bastin
2020-08-02 11:47:51 -04:00
parent 3c3e8a6c31
commit 45f1e386cc
2 changed files with 4 additions and 11 deletions

View File

@@ -112,18 +112,11 @@ export default {
provideLinting: debounce(function (code) {
try {
const res = esprima.parseScript(code, { tolerant: true })
console.log(res)
if (res.errors && res.errors.length > 0) {
this.editor.session.setAnnotations(
res.errors.map((err) => {
const pos = this.editor.session.getDocument().indexToPosition(err.index, 0)
console.log({
row: pos.row,
column: pos.column,
text: err.description,
type: "error",
})
return {
row: pos.row,
column: pos.column,