display errors in CodeEditor

I have implemented code processing for errors on the backend. In case of an error in the code, the back sends an object with fields: the line on which the error is, the tag in which the error is, and a comment.
How can I make the error display like on the screen?

You may be looking for the @codemirror/lint package.

Yeah I tried to use this package
Do I understand correctly that we need to add linter from @codemirror/lint to the extensions, in which we pass the error object as the second parameter?
But I don’t understand what should be the first parameter, which is the source