Skip to content

feat(cli): add format subcommand#42

Open
nicomiguelino wants to merge 3 commits into
mainfrom
feat/format-subcommand
Open

feat(cli): add format subcommand#42
nicomiguelino wants to merge 3 commits into
mainfrom
feat/format-subcommand

Conversation

@nicomiguelino

Copy link
Copy Markdown
Contributor

Summary

  • Adds format subcommand to edge-apps-scripts wrapping Prettier
  • Supports --check flag for CI-style verification without writing files
  • Accepts explicit paths as args; defaults to . when none provided
  • Falls back to the library's .prettierrc.json unless the project has its own at root
  • Moves prettier from devDependencies to dependencies so consuming apps don't need to install it separately
  • Includes .prettierrc.json in published package files

- Add `format` subcommand wrapping Prettier
- Support `--check` flag for CI-style verification without writing
- Fall back to library's `.prettierrc.json` unless project has its own
- Accept explicit paths as args; default to `.` when none provided
- Move `prettier` from devDependencies to dependencies
- Include `.prettierrc.json` in published files
- Bump version to 1.2.0
@nicomiguelino nicomiguelino self-assigned this Jun 20, 2026
@nicomiguelino nicomiguelino requested a review from Copilot June 20, 2026 23:33
@nicomiguelino nicomiguelino marked this pull request as ready for review June 20, 2026 23:33

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

This PR adds a new format subcommand to the edge-apps-scripts CLI to run Prettier with shared defaults, ensures the shared .prettierrc.json is shipped with the package, and updates dependencies so consuming apps don’t need to install Prettier separately.

Changes:

  • Add edge-apps-scripts format subcommand with --check support and config fallback behavior.
  • Publish .prettierrc.json in the package files list.
  • Move prettier from devDependencies to dependencies and reflect it in the lockfile.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
scripts/cli.js Adds format command wiring and implementation to invoke Prettier with shared config behavior.
package.json Bumps version, includes .prettierrc.json in published files, and moves Prettier to runtime deps.
package-lock.json Updates lockfile dependency classification for Prettier (but needs version fields aligned).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/cli.js
Comment thread scripts/cli.js Outdated

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

Comment thread scripts/cli.js Outdated
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.

2 participants