Skip to content
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

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

jeremymeng
Copy link
Contributor

  • don't add prettier for azure sdk packages
  • update baselines

@qiaozha qiaozha self-assigned this Jul 17, 2024
@@ -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",
Copy link
Member

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?

Copy link
Contributor Author

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,

"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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

@jeremymeng
Copy link
Contributor Author

Not sure about the current CI failures. I ran the same script locally but didn't see any changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants