-
Notifications
You must be signed in to change notification settings - Fork 75
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
Upgrade dev dependency prettier to version 3.3.3 in generated packages #2675
base: main
Are you sure you want to change the base?
Conversation
jeremymeng
commented
Jul 16, 2024
- don't add prettier for azure sdk packages
- update baselines
- don't add prettier for azure sdk packages
@@ -43,7 +43,7 @@ export function getCommonPackageDevDependencies( | |||
"@microsoft/api-extractor": "^7.40.3", | |||
"@types/node": "^18.0.0", | |||
eslint: "^8.55.0", | |||
prettier: "^3.2.5", | |||
prettier: "^3.3.3", |
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 wonder if we really rely on prettier in non azure?
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 did a search and found that there are some @MSInternal tests which use "prettier" but also reference ../../../.prettierrc.json
so I don't know what the design there. For example,
autorest.typescript/packages/typespec-ts/test/integration/generated/type/model/flatten/package.json
Line 48 in 1de92fd
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\" \"samples-dev/**/*.ts\"", |
I didn't see "prettier" being used in other test baselines, so maybe it is safe to remove them, unless we also want to have the ability to format after a non-azure package is generated.
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.
Since the standalone packages still invoke "prettier" even though the config file path is definitely not valid if not within azure-sdk-for-js. I logged a new issue to discuss further: #2700
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 removed all "prettier" dependencies and formatting scripts from non azure monorepo code generation.
… packages" This reverts commit 9384c65.
as ../../../.prettierrc.json only exists in azure mono repo, those scripts don't make sense outside of the azure mono repo.
these generated packages are not using dev-tool to run prettier so they are not for mono repo.
Not sure about the current CI failures. I ran the same script locally but didn't see any changes. |