look at this demo
jsonParseLinter
is a function that returns a lint source. So add ()
after it and your example works.
thanks for your reply
I find the problem recently is version mismatch:
@codemirror/lint 6.4.2
└── @codemirror/view 6.20.2
and I override view to 6.21.2 then solved this question