Add custom diagnostics to Editor(monaco)
@doc-han is already working on this.
Since Feb 16, 2025.
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
Is your feature request related to a problem? Please describe.
Currently, our Editor only provides simple completion suggestions and doesn't really catch other issues we're more interested in.
eg. A user writing an expression that contains blocks that don't follow the openfn way
fn(state=> {
...
// do some work
...
return state;
})
console.log("smth") // not accepted!
Our editor doesn't provide enough help. it just keeps silent and then our compiler goes on to fail.
Tell us about your idea - describe the solution you'd like.
The idea is to provide diagnostic report/markers in the Editor to help users write less error-prone code.
Plan
- Monaco seems to already inject a parser into the browser via a web worker - check network tab for tsWorker.js(1.1MB)
This file is served via jsdelivr. Can we patch it, build our version of tsWorker.js, and load it instead of the default monaco one? - Add a parser (eg. babel-parser, acorn, ...) - which would add approx another 1.1MB to our bundle size. or even lazy loaded(still not fun).
Additional context
...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.