Skip to content

chore: add Prettier formatting with eslint-config-prettier integration - #12

Merged
Hector Hernandez (hectorhdzg) merged 7 commits into
microsoft:mainfrom
hectorhdzg:feature/add-prettier-formatting
Apr 10, 2026
Merged

Hector Hernandez (hectorhdzg) merged 7 commits into
microsoft:mainfrom
hectorhdzg:feature/add-prettier-formatting

Conversation

@hectorhdzg

Copy link
Copy Markdown
Member

No description provided.

- 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-prettier into eslint.config.mjs.
  • Apply formatting-only updates across src/ and test/, 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.

Comment thread package.json Outdated
Comment thread .github/workflows/pr-validation.yml
}
}
// eslint-disable-next-line prefer-rest-params
return originalResponseEnd.apply(response, arguments as any);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these genuine concerns?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you mean? the any types?, this PR is to add formatting not fixing typing :)

@hectorhdzg
Hector Hernandez (hectorhdzg) merged commit fb09893 into microsoft:main Apr 10, 2026
5 checks passed
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