Attempting to install `stylelint-config-prettier` results in NPM error
ChrisMBarr opened this issue · 1 comments
I attempted to install the prettier config file per the instructions by running
npm install --save-dev stylelint-config-prettier
However this resulted in an error (see below). Looking through issues I assume this might be related to issue #284 - and if so it seems like the readme file for this project needs to be updated to remove some information.
What version of stylelint
, prettier
and stylelint-prettier
are you using?
"prettier": "3.0.3",
"stylelint": "^15.10.3",
"stylelint-config-standard": "^34.0.0",
"stylelint-config-standard-scss": "^11.0.0",
"stylelint-prettier": "^4.0.2",
What did you expect to happen?
For it to install the config
What actually happened?
npm install --save-dev stylelint-config-prettier
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-app@1.0.0
npm ERR! Found: stylelint@15.10.3
npm ERR! node_modules/stylelint
npm ERR! dev stylelint@"^15.10.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer stylelint@">= 11.x < 15" from stylelint-config-prettier@9.0.5
npm ERR! node_modules/stylelint-config-prettier
npm ERR! dev stylelint-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.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\chris\AppData\Local\npm-cache\_logs\2023-09-18T14_03_06_143Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\chris\AppData\Local\npm-cache\_logs\2023-09-18T14_03_06_143Z-debug-0.log
Please read this section of the README: https://github.com/prettier/stylelint-prettier#disabling-rules-that-may-conflict-with-prettier
The only references to stylelint-config-prettier
are in that section and it already states that if you are using stylelint v15 then the section does not apply to uou.
As of Stylelint v15, Stylelint deprecated all stylistic rules that conflict with prettier. If you are using Stylelint v15 and are not using any of these deprecated rules then you do not need to do anything extra; this section does not apply to you.