FluidFramework
FluidFramework copied to clipboard
add prettier to shared tree
Description
This PR adds prettier to the shared tree portion of our repo.
This PR is a portion of PR https://github.com/microsoft/FluidFramework/pull/11613, as it was suggested to split the PR up into several PRs. Running the prettier will be done in separate PRs.
Reviewer Guidance
Questions
- It currently seems to be running into a build error when running the lint test, as I only added the prettier (and did not run it). Is there a way to pass this ci test without running the prettier?
Have you check that this does not add any more warnings to npm run build:fast? Currently we have a bunch of warnings from things like non-conformant build scripts and this change could easily add more if its not just right: be sure to check for that (and double check it just before we actually merge this). There is no CI enforcement of this.
I removed the prettier from the lint command, and checked npm run build:fast to see if there were any additional warnings. Aside from some "non-conformant script" warnings (which should go away when we add the prettier back to the lint commands), there were no additional warnings.
@fluid-internal/tree: warning: non-conformant script "lint"
@fluid-internal/tree: warning: expect: npm run prettier && npm run eslint
@fluid-internal/tree: warning: actual: npm run eslint
@fluid-internal/tree: warning: non-conformant script "lint:fix"
@fluid-internal/tree: warning: expect: npm run prettier:fix && npm run eslint:fix
@fluid-internal/tree: warning: actual: npm run eslint:fix
I removed the prettier from the lint command, and checked
npm run build:fastto see if there were any additional warnings. Aside from some "non-conformant script" warnings (which should go away when we add the prettier back to the lint commands), there were no additional warnings.@fluid-internal/tree: warning: non-conformant script "lint" @fluid-internal/tree: warning: expect: npm run prettier && npm run eslint @fluid-internal/tree: warning: actual: npm run eslint @fluid-internal/tree: warning: non-conformant script "lint:fix" @fluid-internal/tree: warning: expect: npm run prettier:fix && npm run eslint:fix @fluid-internal/tree: warning: actual: npm run eslint:fix
I assumed this cause a warning: looks like I was wrong! Searching fluid-build for "prettier" shows it detects prettier use by searching the package for a script named "prettier". Since that script won't pass until all the formatting is done anyway, I guess we can just remove that one for now, and confirm that fixes the warnings, and add it back in when enabling enforcement of prettier formatting.
We should be able to keep the prettier:fix script, which will be useful during the migration.
This commit is queued for merging with the next branch! Please ignore this PR for now. Contact @microsoft/fluid-cr-infra for help.