-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Re-enable prettier for compiler/ #29993
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Now that the compiler directory has its own prettier config, we can remove the prettierignore entry for compiler/ so it still runs in your editor if you open the root directory ghstack-source-id: aeef8fedf3bac7c81a81d5bec5bc32100da65174 Pull Request resolved: #29993
Comparing: b15c849...a78be41 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
Now that the compiler directory has its own prettier config, we can remove the prettierignore entry for compiler/ so it still runs in your editor if you open the root directory ghstack-source-id: 5e3bd597cf2f11a9931f084eb909ffd81ebdca81 Pull Request resolved: #29993
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.
Please also update CI so this is checked, I think all that's needed is this glob:
https://github.com/facebook/react/blob/main/scripts/prettier/index.js#L54
I think you may have looked at the older commit, I already pushed those changes |
The linked glob |
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.
see above
@kassens I think there's some misunderstanding. the compiler has its own prettier config if you look at the compiler directory. This particular top level script doesn't need to run on the compiler directory as a result and so the current setup to only run on .js files and ignore compiler is correct. Keep in mind this script only runs in CI. But leaving the compiler entry in .prettierignore is disabling prettier itself in the editor if you open the root directory instead of just the compiler. Additionally it would try to run prettier on some .js files in compiler. So essentially the right thing to do is to remove the compiler from .prettierignore (allowing the editor to invoke prettier) and continue skipping it in the prettier script which only runs in CI. |
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 see, would be nice to integrate into the main prettier CI now that Forget is merged.
Now that the compiler directory has its own prettier config, we can remove the prettierignore entry for compiler/ so it still runs in your editor if you open the root directory ghstack-source-id: 5e3bd597cf2f11a9931f084eb909ffd81ebdca81 Pull Request resolved: #29993
Stack from ghstack (oldest at bottom):
Now that the compiler directory has its own prettier config, we can
remove the prettierignore entry for compiler/ so it still runs in your
editor if you open the root directory