-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Prettier shared config package #20026
Conversation
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.
We have configs for other tools so it might make sense to keep one for Prettier. Does it have any custom rule for WordPress setup enforced with the Prettier fork? We could add a note that it can be used with @wordpress/scripts
to avoid the hassle and maybe mention the fork as well?
I think Can we also update the existing config in |
Co-Authored-By: Grzegorz (Greg) Ziółkowski <grzegorz@gziolo.pl>
f3b111e
to
cc873ff
Compare
Size Change: 0 B Total Size: 856 kB ℹ️ View Unchanged
|
cc873ff
to
2f33319
Compare
2f33319
to
7539155
Compare
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.
@ntwb – I rebased this branch with master
and addressed my own feedback. Feel free to edit my commit if you disagree with any of the changes applied.
This PR should be ready to go.
Thanks, sorry, have been on holidays and catching up on all the things. Looks good to me 👍🏼 |
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't approve my own PR 😬
I hope you had great time 😃 |
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", | ||
"resolved": false, |
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.
These values keep being flipped back and forth. I summarized some findings at #16157 (comment) . Out of curiosity, do you use Linux for development (or another OS which would "opt out" of the optional dependencies here)? Or an older version of NPM (older than latest 6.14.2
)?
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'm now on npm 6.14.2
, I believe I was on 6.14.1
at the time of this commit. I'm using macOS all the time. I have no idea why this value changes so often.
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 strongly suspect it's related to the fact that the dependencies are "optional", though it seems like in macOS they would not typically be skipped. In any case, it does feel like it's something largely on npm
's end (i.e. I do not think it's correct that this would ever be false
). Wondering if we could do something to address it in the meantime though. For example, we could create a script which is run during the build and verifies deeply that there are no "resolved": false
in package-lock.json
. But I'm not sure yet how we make these issues actionable from the perspective of the pull request author; in other words, how it would be expected that you would fix the problem.
Description
Add Prettier shared config package
How has this been tested?
npm run test-unit
npm run test-lint-js
npm run lint-format-js
Types of changes
Checklist: