sublimelsp / LSP-eslint

ESLint support for Sublime LSP plugin
MIT License
36 stars 5 forks source link

Stopped working on one machine with no apparent error messages #60

Closed Nantris closed 1 year ago

Nantris commented 1 year ago

Describe the bug LSP no longer recognizes some (but not all) ESLint rules and no longer shows the diagnostic panel upon saving despite these settings:

{
  "log_debug": true,
  "show_view_status": true,
  "lsp_format_on_save": false,
  "show_diagnostics_panel_on_save": 1,
  "show_inlay_hints": true,
  "lsp_code_actions_on_save": {
    "source.fixAll": true,
    "source.fixAll.eslint": true,
  },
}

To Reproduce Unknown

Expected behavior LSP does not begin to silently fail. I'm not actually sure how many days this issue has occurred before I realized

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Another machine with an identical configuration continues to work and I cannot make it fail there.

Nantris commented 1 year ago

Actually I get @typescript-eslint/parser can't be found in a popup, but I don't know how to trigger it again. Nothing shows in the Sublime console - and @typescript-eslint/parser is installed at the expected location in our node_modules

Edit: Specifically nothing is shown as wrong when in fact no-undef should trigger. ESLint still detects it, but LSP doesn't show it.

rchl commented 1 year ago

Your issue seems specific to LSP-eslint so transferred there.

Try to runnpx eslint in the root of the root. You will most likely get the same error which would indicate that there is an issue with your eslint configuration or dependencies.

If it works on the command line then please provide output of LSP: Troubleshoot server

Nantris commented 1 year ago

@rchl thanks for your help. In this case it turned out that no-use-before-define was not configured to error, and rather was "off" - I apologize for the wasted time, but thank you for helping me find the underlying issue.