Skip to content

chore(ui): add prettier-plugin-packagejson to enforce key ordering#11172

Open
pfe-nazaries wants to merge 1 commit into
masterfrom
chore/ui-prettier-plugin-packagejson
Open

chore(ui): add prettier-plugin-packagejson to enforce key ordering#11172
pfe-nazaries wants to merge 1 commit into
masterfrom
chore/ui-prettier-plugin-packagejson

Conversation

@pfe-nazaries
Copy link
Copy Markdown
Contributor

Context

ui/package.json and the pnpm.overrides block had grown an ad-hoc key ordering that diverged across edits, making diffs noisy and prone to merge conflicts. Adding prettier-plugin-packagejson automates a canonical ordering so future edits stay diff-friendly without manual sorting.

Description

  • Adds prettier-plugin-packagejson@2.5.22 as a devDependency in ui/package.json.
  • Registers the plugin in ui/.prettierrc.json alongside prettier-plugin-tailwindcss.
  • Applies the resulting canonical ordering to ui/package.json (scripts, dependencies, devDependencies, and pnpm.overrides).
  • Refreshes ui/dependency-log.json and ui/pnpm-lock.yaml to reflect the new devDependency.

No runtime/behavior changes — purely tooling and key ordering inside package.json.

Steps to review

  1. Inspect ui/.prettierrc.json to confirm the plugin is registered before prettier-plugin-tailwindcss.
  2. Inspect ui/package.json and verify the reordered scripts, pnpm.overrides, and the new prettier-plugin-packagejson devDependency.
  3. From ui/, run pnpm install and then ./node_modules/.bin/prettier --check package.json — should report no changes.
  4. Optional: make a small unsorted edit to ui/package.json, run ./node_modules/.bin/prettier --write package.json, and confirm it gets re-sorted automatically.

Checklist

Community Checklist
  • This feature/issue is listed in here or roadmap.prowler.com
  • Is it assigned to me, if not, request it via the issue/feature in here or Prowler Community Slack

SDK/CLI

  • Are there new checks included in this PR? No

UI

  • All issue/task requirements work as expected on the UI (N/A — tooling-only change, no runtime impact)
  • Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
  • Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
  • Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
  • Ensure new entries are added to CHANGELOG.md, if applicable. (N/A — dev-tooling only, no user-visible change)

API

  • All issue/task requirements work as expected on the API
  • Endpoint response output (if applicable)
  • EXPLAIN ANALYZE output for new/modified queries or indexes (if applicable)
  • Performance test results (if applicable)
  • Any other relevant evidence of the implementation (if applicable)
  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@pfe-nazaries pfe-nazaries requested a review from a team as a code owner May 14, 2026 10:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@pfe-nazaries pfe-nazaries force-pushed the chore/ui-prettier-plugin-packagejson branch from 4f5650e to 685f85e Compare May 14, 2026 10:22
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Changes detected in the following folders without a corresponding update to the CHANGELOG.md:

  • ui

Please add an entry to the corresponding CHANGELOG.md file to maintain a clear history of changes.

@pfe-nazaries pfe-nazaries added the no-changelog Skip including change in changelog/release notes label May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

🔒 Container Security Scan

Image: prowler-ui:5bbadd9
Last scan: 2026-05-14 15:54:00 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 2
Total 2

2 package(s) affected

⚠️ Action Required

Critical severity vulnerabilities detected. These should be addressed before merging:

  • Review the detailed scan results
  • Update affected packages to patched versions
  • Consider using a different base image if updates are unavailable

📋 Resources:

Adds prettier-plugin-packagejson@2.5.22 as a devDependency and registers
it in .prettierrc.json before prettier-plugin-tailwindcss so prettier
keeps ui/package.json keys in the conventional npm order.

Reformatting package.json is a no-op functional change (key ordering
only). Verified with `pnpm exec prettier --check package.json` and
`pnpm run healthcheck`.

Refs: WebstormProjects-7b1

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pfe-nazaries pfe-nazaries force-pushed the chore/ui-prettier-plugin-packagejson branch from 685f85e to 5198b02 Compare May 14, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/ui no-changelog Skip including change in changelog/release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant