-
Notifications
You must be signed in to change notification settings - Fork 28
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
chore: auto format some TypeScript files #286
Conversation
console.log( | ||
"Instrumenting Lambda Functions in TypeScript stack with Datadog" | ||
); | ||
console.log("Instrumenting Lambda Functions in TypeScript stack with Datadog"); |
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.
Isn't it possible to format them with a plugin? Instead of relying on a formatter that is only installed in your computer? |
@duncanista Right now the format check only covers See the format check failure on the demo commit: https://github.com/DataDog/datadog-cdk-constructs/actions/runs/10605642445/job/29394854056 |
2cb24c9
to
983592b
Compare
@@ -67,7 +67,7 @@ const project = new awscdk.AwsCdkConstructLibrary({ | |||
"CONTRIBUTING.md", | |||
], | |||
scripts: { | |||
"check-formatting": "prettier --check src/**", | |||
"check-formatting": "prettier --check src/** integration_tests/**/*.ts examples/**/*.ts", |
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 tried to find a more succinct way to get all .ts
files in the repo, but couldn't find one. For example, I tried **/*.ts
and */**/*.ts
, but both fail to find some files in integration_tests
or in examples
.
@lym953 ok, thanks for the detailed explanation and the comment on what work and what didn't, approving, feel free to take the right decision! |
983592b
to
46a3573
Compare
/merge |
🚂 MergeQueue: pull request added to the queue The median merge time in Use |
What does this PR do?
Auto format some TypeScript files
Motivation
The next PR (#285) will touch lots of files, and saving those files on VS Code on my laptop will auto-format those files, mixing formatting changes and other changes in the same PR, so I want to separate out the formatting changes to this PR to make changes easier to review.
I can also disable "format on save" on my IDE, but I think it's a good thing to keep code in good format.
Testing Guidelines
npx projen build
, no errorAdditional Notes
Types of Changes
Check all that apply