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
[Bug?]: Yarn pnp / sdk generation doesn't work with ESLint new flat config support #6219
Comments
Any news on this. This issue is basically blocking flat config adaption with VS Code / eslint extension. |
I'm looking right now at migrating this repository to Eslint 9; I'll take a look at that at the same time. |
I'm experimenting in #6278 - it seems to work with your (very detailed, thanks a lot!) reproduction, but it still fails in VSCode. Trying to figure out what might be different. |
I think I figured it out - v18.19.0 is the first version that supports |
@arcanis thanks for looking into this. Which node version is required to make this work. I tested the same steps under Node 20.10.0 and it produces the same exception. |
You need both my PR (#6278) and Node >v20.6.0, v18.19.0; you can try it by cloning my branch and running your repro in this repo. |
Thanks! We will move to Electron 29 in the near future which will come with NodeJS 20.x |
Self-service
Describe the bug
ESLint's new flat config support fails to load when using flat config module files. It does work when using common JS config files.
This bahviour gor reported against the VS Code ESLint extension (see microsoft/vscode-eslint#1620) but it is independent of the VS Code extension and can be reproduce using the eslint npm package standalone
To reproduce
Setup:
package.json
eslint.config.mjs
test.js
Run the following commands in a shell:
Setting the NODE_PATH is equivalent to setting the VS Code eslint.nodePath setting.
start node REPL and execute the following commands (to ensure to mimic the executing since a VS Code extension):
We will load the eslint npm module from .yarn/sdks
You get:
Expected behavior: the eslint.config.mjs can successfully be loaded. Converting the config file to cjs makes everything work.
Environment
System:
OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700K
Binaries:
Node: 18.18.2 - /tmp/xfs-e72dc863/node
Yarn: 4.1.1 - /tmp/xfs-e72dc863/yarn
npm: 9.8.1 - ~/.nvs/default/bin/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: