uiwjs / react-codemirror

CodeMirror 6 component for React. @codemirror https://uiwjs.github.io/react-codemirror/
https://uiwjs.github.io/react-codemirror/
MIT License
1.69k stars 135 forks source link

lint work incorrent in 4.21.19 #592

Closed hemisu closed 9 months ago

hemisu commented 1 year ago
image

look this not show the diagnose error

jaywcjlove commented 1 year ago

@hemisu The lint extension is not added by default and needs to be added manually.

hemisu commented 1 year ago

@jaywcjlove https://codemirror.net/try/?c=aW1wb3J0IHtiYXNpY1NldHVwLCBFZGl0b3JWaWV3fSBmcm9tICJjb2RlbWlycm9yIgppbXBvcnQgeyBqc29uLCBqc29uUGFyc2VMaW50ZXIgfSBmcm9tICdAY29kZW1pcnJvci9sYW5nLWpzb24nOwppbXBvcnQge2xpbnRlcn0gZnJvbSAiQGNvZGVtaXJyb3IvbGludCIKCm5ldyBFZGl0b3JWaWV3KHsKICBkb2M6ICJ7IFwiMVwiOiAxLCwsfVxuIiwKICBleHRlbnNpb25zOiBbYmFzaWNTZXR1cCwganNvbigpLCBsaW50ZXIoanNvblBhcnNlTGludGVyKV0sCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5Cn0pCg==

add lint but not work well

jaywcjlove commented 1 year ago

@hemisu Example: https://codemirror.net/examples/lint/

You can find the solution you need at https://discuss.codemirror.net/.

fabpico commented 9 months ago

@jaywcjlove add lint but not work well

There are missing braces linter(jsonParseLinter) -> linter(jsonParseLinter()). See fixed code.

But still, the linting is not satisfactory. The minimalistic red arrow in the mittle of the line, and the missing error icon in the line numbers bar. This was also reported here https://discuss.codemirror.net/t/json-linter-ux/3560.

jaywcjlove commented 9 months ago