Minimal working lint example for own language

I am trying to init minimal lint example for my own language but getting error - does not provide an export named Diagnostic.

Is there working minimal code example to init lint in the vue framework?

I think that I need something like this:

but I can not link it to my needs. It will be language in my case, not lang-json. What should be instead of a jsonParseLinter? And how do I define this function? possible like this
CodeMirror Lint Example but Diagnostic gives error.

Which way should I take a step?

Diagnostic is a type. You can import it in TypeScript, but not in plain JavaScript.