Showing syntax errors

Is there an example I could look through for showing syntax errors inside the editor? I had written a custom language parser for RDF 1.1 Turtle but I would like to also show parsing errors in the editor (squiggly underline or something similar) for when the parsing encounters errors. Is there an example of say lang-javascript or lang-json someone could point me to? Thanks in advance.

You may be looking for the lint addon (demo here).

Any CodeMirror6 examples? Should have clarified that.

Not yet. But the docs for the lint package should get you pretty far.