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

not compatible with eslint 9+? #222

Closed
nullbio opened this issue May 14, 2024 · 6 comments
Closed

not compatible with eslint 9+? #222

nullbio opened this issue May 14, 2024 · 6 comments
Labels

Comments

@nullbio
Copy link

nullbio commented May 14, 2024

I think this is because the plugin does not appear to be compatible with eslint 9?

Error: Could not warm up worker. Formatting a file for the first time may take longer than usual.
Message: Invalid Options:
- Unknown options: ignorePath, resolvePluginsRelativeTo, rulePaths, useEslintrc
- 'resolvePluginsRelativeTo' has been removed.
- 'ignorePath' has been removed.
- 'rulePaths' has been removed. Please define your rules using plugins.
Stacktrace: Error: Invalid Options:
- Unknown options: ignorePath, resolvePluginsRelativeTo, rulePaths, useEslintrc
- 'resolvePluginsRelativeTo' has been removed.
- 'ignorePath' has been removed.
- 'rulePaths' has been removed. Please define your rules using plugins.
    at processOptions (/node_modules/eslint/lib/eslint/eslint-helpers.js:839:15)
    at new ESLint (/node_modules/eslint/lib/eslint/eslint.js:593:34)
    at getESLint (/node_modules/prettier-eslint/dist/utils.js:337:12)
    at getESLintConfig (/node_modules/prettier-eslint/dist/index.js:268:39)
    at analyze (/node_modules/prettier-eslint/dist/index.js:80:77)
    at format (/node_modules/prettier-eslint/dist/index.js:50:13)
    at file:///home/node/.vscode-server/extensions/rvest.vs-code-prettier-eslint-6.0.0/dist/worker.mjs:1:1516

Here's a github issue having the same errors due to version incompatibility, hence why I assume this is the reason:

vercel/next.js#64409

@dpnova
Copy link

dpnova commented May 23, 2024

Confirmed here too

@mattbrannon
Copy link
Contributor

ESLint version 9 deprecated .eslintrc files in favor of what they call "flat configs" which essentially are just javascript objects with a similar but slightly different structure. https://eslint.org/docs/latest/use/configure/configuration-files

If you're trying to use the new config format, it won't work until the extension is updated.

You should be able to do one of the following to get things working:

  • Set ESLINT_USE_FLAT_CONFIG=false in a .env file
  • Downgrade ESLint to version 8

@kevin82222
Copy link

Wow! I hope it can be supported.

Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Jul 22, 2024
Copy link

github-actions bot commented Aug 5, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed Aug 5, 2024
@dpnova
Copy link

dpnova commented Aug 6, 2024

FWIW I use this setting now: "editor.defaultFormatter": "esbenp.prettier-vscode", no need for the extra vscode extension. Just configure eslint correctly with the prettier rules and use prettier-vscode as your formatter.

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

No branches or pull requests

4 participants