Open tzcodingjs opened 2 months ago
Upgrade your vscode-eslint
to v3.0.5 (pre-release)
. This solved it for me 🙂. It seems that the current stable version can't handle eslint's new flat config file...
That is correct. 2.4.4. has limited support for flat configs. @tzcodingjs do things work for you with 3.0.5 pre-release?
That is correct. 2.4.4. has limited support for flat configs. @tzcodingjs do things work for you with 3.0.5 pre-release?
3.0.5 it's not worked, but I rolling back to 2.2.6 everything is ok So odd.
Upgrade your
vscode-eslint
tov3.0.5 (pre-release)
. This solved it for me 🙂. It seems that the current stable version can't handle eslint's new flat config file...
Thanks! But it's not worked.
That is strange. Can you provide me with a GitHub repository I can clone with a minimal setup that demos this.
That is strange. Can you provide me with a GitHub repository I can clone with a minimal setup that demos this.
This project https://github.com/Chanzhaoyu/chatgpt-web
@tzcodingjs can you please provide me with a repository with a minimal setup. This looks like a normal development repository.
Upgrade your
vscode-eslint
tov3.0.5 (pre-release)
. This solved it for me 🙂. It seems that the current stable version can't handle eslint's new flat config file...
This worked fine for me, although I did have to restart vscode multiple time before it started working.
I had this issue with eslint v9. rolling back to 8.5x fixed this for me. I'm not using flat config, but the old config.
I had useFlatConfig
in settings.json to false
@ShravanSunder can you please provide me with a GitHub repository I can clone with a minimal setup that demos this.
I do have a test case for 9.0 with the old rc based config and the works for me: https://github.com/microsoft/vscode-eslint/blob/553e632fb4cf073fce1549fb6c3c1b5140a52ebb/playgrounds/9.0/rc/package.json#L1
So I would be interested to understand why this fails for you.
Downgrading to eslint version 8.57.0
resolved the issue for me
As of right now, eslint v9, old eslint config and vscode are incompatible.
@ShravanSunder @dotspencer do you have a GitHub repository I can clone that demos thus.
And did you both use the pre-release version of ESLint (3.0.5)
Upgrade your
vscode-eslint
tov3.0.5 (pre-release)
. This solved it for me 🙂. It seems that the current stable version can't handle eslint's new flat config file...
it worked! thanks so much.
I see the same error returning to a project that I have not opened in a while ...
I am not using the new flat config:
"eslint": "^8.38.0"
What I have tried:
I do not have eslint installed globally and my project is not inside another project on my system
Absolutely maddening.
@tayloraleach what happens when you run ESLint in the terminal from the node_modules
folder. If that works, could you please provide me with a GitHub repository I can clone that demos what you are seeing.
@dbaeumer here's a fresh repo created with npx create-next-app@13.3
which installs eslint@8.57.0
and has a minimal .eslintrc.json
- https://github.com/spro/nextjs-13.5.6-eslint
I see the same issue as above. Downgrading to 2.4.4 does not work, but 2.2.6 is fine.
@spro
Thanks for the repository. But it works for me:
Any additional steps / setup?
By comparing your output to mine I found the issue. I was seeing this:
[Info - 1:24:33 PM] ESLint server is starting.
[Info - 1:24:33 PM] ESLint server running in node v20.9.0
[Info - 1:24:33 PM] ESLint server is running.
[Info - 1:24:34 PM] ESLint library loaded from: /Users/sean/Projects/nextjs-13.5.6-eslint/node_modules/eslint/lib/unsupported-api.js
[Info - 1:24:34 PM] ESLint version 8.57.0 supports flat config without experimental opt-in. The 'eslint.experimental.useFlatConfig' setting can be removed.
2024-06-28T20:24:34.008Z eslint:flat-eslint Searching for eslint.config.js
[Error - 1:24:34 PM] Calculating config file for file:///Users/sean/Projects/nextjs-13.5.6-eslint/pages/index.tsx) failed.
Error: Could not find config file.
I had been ignoring the warning "'eslint.experimental.useFlatConfig' setting can be removed" as I didn't think I had that set - it didn't show as checked in the preferences UI. But after looking again I found and removed it from my User-level settings.json
.
Good to hear you got it working.
develop enviroment: vscode: 1.88.0 nodejs: 18.19.1 vscode-eslint: 2.4.4
When open project with vscode always show error: