Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code warning about soon-to-be-dropped code action #724

Open
philsherry opened this issue Apr 2, 2024 · 3 comments
Open

VS Code warning about soon-to-be-dropped code action #724

philsherry opened this issue Apr 2, 2024 · 3 comments

Comments

@philsherry
Copy link

Quick fixes have stopped working for me.

VS Code saying “Checking for quick fixes...”

Now I just get stuck on “Checking for quick fixes...” and the following warning in the Extension Host console:

[warning] trunk.io - Code actions of kind 'quickfix 'requested but returned code action is of kind 'source.fixAll'. 
Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
cli:
  version: 1.21.0
plugins:
  sources:
    - id: trunk
      ref: v1.4.5
@TylerJang27
Copy link
Collaborator

Hi @philsherry! Sorry for the delay on this. This is the first time we've seen this issue. Could you provide some additional information:

  1. What version of VSCode are you running?
  2. Does this only happen in JS/TS files and only with eslint or also with other linters?
  3. Is there any pattern of behavior that causes this to happen? Does the issue temporarily go away when you reload (close/relaunch) VSCode?

@philsherry
Copy link
Author

philsherry commented Apr 21, 2024

Took me a few days to get back to this, but:

  1. My VS Code is always latest production, so it was whatever release version was current at the time.
  2. It was ESLint-specific as far as I could tell.
  3. It had become default behaviour.

In the time it's taken for us both to respond, this is no longer happening. However…

stderr: |
  Oops! Something went wrong! :(
  ESLint: 9.0.0
  Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/js' imported from eslint.config.js

I’ve since tried updating to ESLint 9 and Trunk doesn’t seem to like it. So, maybe the issue has been fixed by an updated VS Code, or maybe it’s Trunk’s inability to handle the ESLint 9 config? Could be either. Or both. Or neither. 😄

Is there anything specific that is required to switch from ESLint 8 -> 9? I assume you've given it a good going over to check.

Edit: I had a look at the suggested config for it and it doesn’t look to be covered here. I see only legacy config file names in the array—not the newer, flat config style.

They’re already up to 9.1.1 with the new release, so I don’t consider this to be a cutting-edge release; especially when flat config has been available throughout a lot of version 8. In case it’s of any use, I’ll link to the Issue where they’ve been tracking the rollout of a lot of the plugins and shared configs: Tracking: Flat Config rollout.

@TylerJang27
Copy link
Collaborator

Hi! Glad the original issue is no longer a problem. As for Eslint9, we are aware of the new eslint flat config changes and haven't finalized our approach for upgrading our existing users. With that being said, we just landed some temporary migration guidelines if you want to start using ESlint9. Please let us know if you encounter any issues with that override.

We plan to have a more OOTB approach for Eslint9, but it's likely a few weeks out from being released, so you should use the override in the meantime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants