-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Frontend] Standardize code style using prettier #2406
Comments
I am planning a few steps on doing this:
Note: there's an ongoing long PR for frontend/server: #2081, I will format server code after it gets merged. |
My current prettier config that is mostly the same as our existing code style. trailingComma: all
singleQuote: true
jsxSingleQuote: true Made a PR for this config: #2409
For configuration, reference: https://prettier.io/docs/en/options.html and https://prettier.io/docs/en/configuration.html The only major difference is
Another difference to discuss is The following PRs are examples of what code will be changed after applying different configs:
|
UPDATE, discussed with @jingzhang36 and @rmgogogo. Agreed on printWidth: 100 option, because our screens are larger than before. |
Only left work item is enforcing code style for /close |
@Bobgy: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Note, also standardized |
A standard https://prettier.io/ config that allows everyone format code in the same way helps improve development productivity and avoid wasted efforts during review.
Also suggested by @eterna2
/area front-end
/priority p0
UPDATE: I never considered using clang-format (used in google) for this project, because it doesn't support tsx(react) formatting and deviates a lot from existing code style.
The text was updated successfully, but these errors were encountered: