ESLint: Cannot read properties of undefined (reading 'loc') Occurred while linting /home/non/test/index.ts. Please see the 'ESLint' output channel for details.
Request Actions:
1. Open Output
Is there a way to prevent this error from showing by using custom handler? If so, can somebody point me to some example of doing that?
I would copy/paste the exact error here, as I found your initial bug report confusing and had to read through the rpc logs in order to extract the error you were seeing.
Maybe something like:
setup{
...
handlers = {
['window/showMessageRequest'] = function(_, result, params) return result end
}
Added the error.
I thought you would watch asciinema and pause when error occured.
Oh well…
I guess that would prevent me from using code actions, right? Which one of the main reasons I’m using it in the first place.
Hmmm… it appears that it doesn’t interfere with code action window.
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:465: method "window/showMessageRequest": either a result or an error must be sent to the server in response
stack traceback:
[C]: in function 'error'
/usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:465: in function </usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:457>
I assume there is something you can change in your project/eslint to avoid the error, but this should interfere with nothing (apart from silently ignoring showMessageRequest)
How it can sound this way? Have you seen the repro? It has .eslintrc with indent rule. And the project I’m working on has it too.
And from link above you can see that people recommend using @typescript-eslint/indent rule instead of eslint indent rule for typescript projects, but I don’t see that as good option because according to the maintainers it is broken. Better do nothing with the code on eslint --fix than do strange things.