npetruzzelli / eslint-config-prettier-standard

An ESLint shareable config for projects using 'Prettier' and 'JavaScript Standard Style' as ESLint rules.
BSD 3-Clause "New" or "Revised" License
39 stars 3 forks source link

Support v3.0.0 of Prettier #17

Closed softwarespot closed 1 year ago

softwarespot commented 1 year ago

This is the following output when using the latest version of Prettier. Is it possible to update the peer dependency to support the latest version? Happy to provide more information. Thanks

npm ERR! Could not resolve dependency:
npm ERR! peer prettier@"^2.4.0" from prettier-config-standard@5.0.0
npm ERR! node_modules/prettier-config-standard
npm ERR!   dev prettier-config-standard@"^5.0.0" from the root project
npm ERR!   peer prettier-config-standard@">=1.0.0" from eslint-config-prettier-standard@4.0.1
npm ERR!   node_modules/eslint-config-prettier-standard
npm ERR!     dev eslint-config-prettier-standard@"^4.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: prettier@2.8.8
npm ERR! node_modules/prettier
npm ERR!   peer prettier@"^2.4.0" from prettier-config-standard@5.0.0
npm ERR!   node_modules/prettier-config-standard
npm ERR!     dev prettier-config-standard@"^5.0.0" from the root project
npm ERR!     peer prettier-config-standard@">=1.0.0" from eslint-config-prettier-standard@4.0.1
npm ERR!     node_modules/eslint-config-prettier-standard
npm ERR!       dev eslint-config-prettier-standard@"^4.0.1" from the root project
jimmy-sandoval commented 1 year ago

Same error for me, any solution?

npetruzzelli commented 1 year ago

@softwarespot - Thank you for opening the issue. Prettier's newest version came out July 5, 2023 (about 2 weeks ago) and I missed it.


The naive answer is updating the peer dependency to support multiple ranges should be enough, but I try to be excessively stable with this config.


It has been a while since I last updated this package, so I'll need to do a few things:

  1. What options have been added or changed (prettier 2.x) since I last updated the config, and how can I account for it in a non-breaking way?
    • Update and publish new minor version of the config, or major version if appropriate
  2. What is new in Prettier 3.x?
    • Update and publish new major version

I will look into whether or not I can support both major versions in a single release.

I may also need to update prettier-config-standard as well.

npetruzzelli commented 1 year ago

@softwarespot @jimmy-sandoval

eslint-config-prettier-standard does not directly define a Prettier peer dependency, that came directly from prettier-config-standard.

I recently published an update to the prettier config. Please try updating to prettier-config-standard@6.0.0 and let me know if that resolves your issues.

You can try updating to the latest prettier-config-standard@7.0.0, but 2 options changed which might result in a larger diff than you might otherwise be expecting. Have a look at the releases to see what your options are!

I don't think there is any work that will need to be done in this repo, but I will wait a while for your response before closing the issue.

softwarespot commented 1 year ago

Thanks @npetruzzelli. I have now tested with the latest prettier-config-standard@7.0.0 and it's working as intended. I will now close this issue