Re-enable prettier for compiler/#29993
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
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
|
kassens
left a comment
There was a problem hiding this comment.
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 |
|
@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. |
kassens
left a comment
There was a problem hiding this comment.
I see, would be nice to integrate into the main prettier CI now that Forget is merged.
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