N
Nuxt6mo ago
jenn2hi

Prettier & ESLint in VSCode

I'm trying to get Prettier and ESLint working in my Cursor (VSCode offshoot) editor in order to get it to highlight when there are the wrong number of tabs. I've tried installing @nuxt/eslint, eslint-config-prettier, prettier, with no success. On the advice of other posts here, I've removed eslint-config-prettier and prettier. I've tried installing @Anthony Fu/eslint-config but there was an error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: @antfu/[email protected]
npm ERR! node_modules/@antfu/eslint-config
npm ERR! @antfu/eslint-config@"2.16.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @antfu/eslint-config@"2.16.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/eslint
npm ERR! peer eslint@">=9.0.0" from @eslint-react/[email protected]
npm ERR! node_modules/@eslint-react/eslint-plugin
npm ERR! peerOptional @eslint-react/eslint-plugin@"^1.5.8" from @antfu/[email protected]
npm ERR! node_modules/@antfu/eslint-config
npm ERR! @antfu/eslint-config@"2.16.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: @antfu/[email protected]
npm ERR! node_modules/@antfu/eslint-config
npm ERR! @antfu/eslint-config@"2.16.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @antfu/eslint-config@"2.16.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/eslint
npm ERR! peer eslint@">=9.0.0" from @eslint-react/[email protected]
npm ERR! node_modules/@eslint-react/eslint-plugin
npm ERR! peerOptional @eslint-react/eslint-plugin@"^1.5.8" from @antfu/[email protected]
npm ERR! node_modules/@antfu/eslint-config
npm ERR! @antfu/eslint-config@"2.16.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Can anyone help please?
3 Replies
jenn2hi
jenn2hi6mo ago
there's no line for antfu. It didn't get installed. I'll try legacy-peer-deps grr. Same error. npx @antfu/eslint-config@latest --legacy-peer-deps it's in his documentation, but yeah, I can try your suggestion Okay, I installed antfu under dev, used the rest of his instructions. I'm still having the problem of the incorrect number of tabs not being highlighted. Any suggestions?
jenn2hi
jenn2hi6mo ago
just fyi here's the instructions I used: https://github.com/antfu/eslint-config?tab=readme-ov-file
GitHub
GitHub - antfu/eslint-config: Anthony's ESLint config preset
Anthony's ESLint config preset. Contribute to antfu/eslint-config development by creating an account on GitHub.
Muhammad Mahmoud
I don't quite understand what you need. The tabs settings can be adjusted by prettier that didn't work with you?
Want results from more Discord servers?
Add your server