-
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
Scripts: format
has unknown option parenSpacing
#34622
Comments
Ok, after some research, I found that |
It looks like it's exactly the same issue as reported in #21872. It's just the context is different. The best way to move forward is to stop using the fork and use what the official Prettier has to offer. This is where it is heading, we just need to go through the formal standard of changing coding conventions. Let's close this issue as a duplicate of #21872. Thank you for reporting back your findings and documentation of all the issues you had. It's a good reminder why using an npm alias doesn't scale well 👍🏻 |
Thanks for finding the duplicate, @gziolo! Indeed, this seems to be the same underlying issue. Too bad that a custom fork of Prettier is needed. However, changing the WP JS coding standards doesn't sound too intriguiing either, as it would quite differ much from the WP PHP coding standards. But that's not for this thread :-) |
Couldn't agree more 😅 |
Description
I'm trying to use
@wordpress/scripts
for my plugin's JS code.Calling
wp-scripts format src/index.js
results in warning likeand spaces after/before parentheses are removed, contrary to WP Coding Standards.
Step-by-step reproduction instructions
npm install @wordpress/scripts --save-dev
.wp-scripts format src/index.js
(withsrc/index.js
being a JS file).[warn] Ignored unknown option { parenSpacing: true }.
is shown, and spaces are wrong.Screenshots, screen recording, code snippet
No response
Environment info
node v16.8.0
npm 7.21.0
@wordpress/scripts 18.0.0
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: