-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
Currently running
This should remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is the right call here.
We had discussion about this in the past. We had prettier
set as an optional dependency because consumers may use eslint-plugin-shopify
without the use of prettier
.
However, docs on [optionalDependencies
](https://docs.npmjs.com/files/package.json#optionaldependencies) seem to imply different behaviour.
The difference is that build failures do not cause installation to fail.
It doesn't seem to have much impact on how dependency resolution works with regards to devDependencies
vs optionalDependencies
. IIRC, when I first PR'd this, I had it set as a peerDep, then changed it to an optionalDep after PR feedback.
We should update the readme to let consumers know that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Needs a CHANGELOG entry, ideally highlighting that this is a breaking change.
CHANGELOG.md
Outdated
@@ -7,6 +7,9 @@ | |||
* `shopify/jest/no-vague-titles` ([#93](https://github.com/Shopify/eslint-plugin-shopify/pull/93)) | |||
* `shopify/strict-component-boundaries` ([#98](https://github.com/Shopify/eslint-plugin-shopify/pull/98)) | |||
|
|||
### Changed | |||
* **Breaking** Moved prettier to be a peerDependency, this avoids the potential for having multiple versions of prettier in the dependency graph ([#107](https://github.com/Shopify/eslint-plugin-shopify/pull/107)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add a note here for consumers to install prettier themselves. Frequent visitors are more likely to read the changelog over readme history.
Helping along with https://github.com/Shopify/sewing-kit/issues/737. We should strive to have a single prettier install underneath sewing-kit, rather than multiple dependencies potentially installing multiple prettier versions which leads to confusion around different formatting tools producing different results.
eslint-plugin-prettier expects prettier to be a peer dependency, so do the same here.