prettier / eslint-config-prettier

Turns off all rules that are unnecessary or might conflict with Prettier.
MIT License
5.39k stars 255 forks source link

Support ESLint 8.x #200

Closed MichaelDeBoey closed 2 years ago

MichaelDeBoey commented 3 years ago

ESLint v8.0.0 is released πŸŽ‰

It would be awesome to have official ESLint 8 support. πŸ‘Š I'm happy to help where I can of course πŸ™‚

lydell commented 3 years ago

Hi!

I assume this is what you opened the issue about?

❯ npm i -D eslint-config-prettier
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: eslint@8.0.0-beta.1
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"8.0.0-beta.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">=7.0.0" from eslint-config-prettier@8.3.0
npm ERR! node_modules/eslint-config-prettier
npm ERR!   dev eslint-config-prettier@"*" 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.

Adding --force it manages to install:

❯ npm i -D eslint-config-prettier --force
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-config-prettier@8.3.0
npm WARN Found: eslint@8.0.0-beta.1
npm WARN node_modules/eslint
npm WARN   dev eslint@"8.0.0-beta.1" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer eslint@">=7.0.0" from eslint-config-prettier@8.3.0
npm WARN node_modules/eslint-config-prettier
npm WARN   dev eslint-config-prettier@"*" from the root project
npm WARN 
npm WARN Conflicting peer dependency: eslint@7.32.0
npm WARN node_modules/eslint
npm WARN   peer eslint@">=7.0.0" from eslint-config-prettier@8.3.0
npm WARN   node_modules/eslint-config-prettier
npm WARN     dev eslint-config-prettier@"*" from the root project

added 1 package, and audited 130 packages in 544ms

17 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

And everything seems to work.

The peer dependency on ESLint is set to >=7.0.0, so it’ll Just Work when ESLint 8.0.0 is released. At some point after that I’ll go through and update this repo and only test with ESLint 8 going forward.

If you know of a peer dependency range that includes pre-releases I’m all ears!

lydell commented 2 years ago

I’m going to close this since ESLint 8.0.0 has been released and eslint-config-prettier works with ESLint 8.0.0.