Vscode-eslint: Add a run on display setting to run when you switch tabs in vs code

Created on 10 Jan 2018  路  3Comments  路  Source: microsoft/vscode-eslint

It would be really helpful to add a run on display setting (indifferent on name) when you switch tabs in vs code.

Here is a common scenario -

  1. Add an import that doesn't exist in File A.
  2. Get red squiggles
  3. Create a new file B for the missing import, edit and save in VS Code.
  4. Go back to your original file.

Expecting: red squiggle disappears
Actual: I have to type a space or something else to get it to re-run

Is there a way to make it more intelligence and auto run based upon some criteria?

bug

All 3 comments

@joshunger good catch. The problem here is that ESLint currently is a single file validator. Scenarios like this need to validate files when other files change / are created / get deleted. Need to think about this more. Doing this on tab change might be an option but will cause problems as well since the count in the status bar should drop to zero as soon as the file gets created.

@dbaeumer I can see that this issue is currently part of the "On Deck" milestone, could you please clarify what this means? I would presume that it means that it hasn't yet been put into a release milestone, but is one level above "Backlog" in terms of priority? I'm wondering as I recently ran into this when settings up import/no-unused-modules, and I thought it'd be great DX wise if the lint error disappeared when switching back to the effected file!

@joealden your interpretation is absolutely correct.

Was this page helpful?
0 / 5 - 0 ratings