Repository navigation
chore: add Prettier formatting with eslint-config-prettier integration - #12
Merged
Hector Hernandez (hectorhdzg) merged 7 commits intoApr 10, 2026
Merged
Hector Hernandez (hectorhdzg) merged 7 commits into
Hector Hernandez (hectorhdzg) merged 7 commits into
Conversation
- Add .prettierrc.json (printWidth: 100, double quotes, semicolons, 2-space indent) - Add .prettierignore for dist, generated, and artifact files - Add eslint-config-prettier to disable conflicting ESLint rules - Add format check to build script and PR validation workflow - Apply formatting to all source and test files
Hector Hernandez (hectorhdzg)
requested review from
Jackson Weber (JacksonWeber),
Nev (MSNev),
Leighton Chen (lzchen) and
Radhika Gupta (rads-1996)
as code owners
April 10, 2026 16:58
Copilot started reviewing on behalf of
Hector Hernandez (hectorhdzg)
April 10, 2026 16:59
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Prettier to the repo and integrates eslint-config-prettier into the ESLint flat config so formatting-related ESLint rules don’t conflict with Prettier, along with repo-wide formatting normalization.
Changes:
- Add Prettier configuration/ignore files and update npm scripts to support format checking/fixing.
- Integrate
eslint-config-prettierintoeslint.config.mjs. - Apply formatting-only updates across
src/andtest/, and add a format check step in PR validation CI.
Reviewed changes
Copilot reviewed 25 out of 29 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utils/basic.ts | Whitespace-only formatting cleanup. |
| test/internal/unit/traces/traceHandler.test.ts | Whitespace-only formatting cleanup. |
| test/internal/unit/shared/logging/diagFileConsoleLogger.test.ts | Prettier-driven reformatting of mocked stubs and whitespace cleanup. |
| test/internal/unit/shared/jsonConfig.test.ts | Wrap long assertions to match Prettier formatting. |
| test/internal/unit/metrics/metricHandler.test.ts | Whitespace-only formatting cleanup around comments. |
| test/internal/unit/metrics/liveMetricsFilter.test.ts | Whitespace-only formatting cleanup in imports. |
| test/internal/unit/metrics/liveMetrics.test.ts | Whitespace-only formatting cleanup. |
| test/internal/unit/main.test.ts | Whitespace-only formatting cleanup. |
| test/internal/unit/logs/logHandler.test.ts | Remove extra blank lines at file header. |
| test/internal/unit/browserSdkLoader/browserSdkLoader.test.ts | Whitespace-only formatting cleanup in test setup blocks. |
| src/shared/module.ts | Whitespace-only formatting cleanup. |
| src/shared/logging/logger.ts | Whitespace-only formatting cleanup between methods. |
| src/shared/logging/diagFileConsoleLogger.ts | Whitespace-only formatting cleanup; no behavior change. |
| src/shared/jsonConfig.ts | Prettier-driven reformatting of type assertions for readability. |
| src/shared/config.ts | Consolidate type import formatting. |
| src/metrics/quickpulse/utils.ts | Whitespace-only formatting cleanup in object literals/loops. |
| src/metrics/quickpulse/liveMetrics.ts | Whitespace-only formatting cleanup. |
| src/metrics/quickpulse/export/exporter.ts | Whitespace-only formatting cleanup. |
| src/metrics/handler.ts | Whitespace-only formatting cleanup. |
| src/logs/batchLogRecordProcessor.ts | Whitespace-only formatting cleanup. |
| src/index.ts | Consolidate import formatting. |
| src/distro/distro.ts | Whitespace-only formatting cleanup. |
| src/browserSdkLoader/browserSdkLoaderHelper.ts | Whitespace-only formatting cleanup. |
| src/browserSdkLoader/browserSdkLoader.ts | Whitespace-only formatting cleanup. |
| package.json | Add eslint-config-prettier, bump Prettier, adjust build/format scripts. |
| eslint.config.mjs | Add eslint-config-prettier to disable conflicting formatting rules. |
| .prettierrc.json | Add Prettier configuration defaults. |
| .prettierignore | Add ignore patterns for build output/generated artifacts. |
| .github/workflows/pr-validation.yml | Add a dedicated format-check step to PR validation workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…hectorhdzg/opentelemetry-distro-javascript into feature/add-prettier-formatting
| } | ||
| } | ||
| // eslint-disable-next-line prefer-rest-params | ||
| return originalResponseEnd.apply(response, arguments as any); |
There was a problem hiding this comment.
Are these genuine concerns?
Member
Author
There was a problem hiding this comment.
What you mean? the any types?, this PR is to add formatting not fixing typing :)
Radhika Gupta (rads-1996)
approved these changes
Apr 10, 2026
Hector Hernandez (hectorhdzg)
merged commit Apr 10, 2026
fb09893
into
microsoft:main
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.