forked from stkb/Rewrap
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Summary
Request to create a Prettier plugin that integrates Rewrap's intelligent comment wrapping capabilities into Prettier's formatting pipeline.
Currently, prettier doesn't handle comment wrapping (prettier/prettier#265).
Proposed Solution
Create a Prettier plugin that:
- Integrates Rewrap's comment wrapping logic into Prettier's formatting pipeline
- Respects Prettier's printWidth configuration
- Maintains Rewrap's word boundary detection
- Works with all file types that both Prettier and Rewrap support
Benefits
- Unified formatting workflow: One command (prettier --write) handles all formatting
- CI/CD integration: Easier to enforce consistent formatting in automated workflows
- Editor integration: Works seamlessly with Prettier's extensive editor support
Technical Considerations
This would likely involve:
- Creating a new npm package (e.g., prettier-plugin-rewrap)
- Implementing Prettier's plugin API
- Adapting Rewrap's core logic to work within Prettier's AST processing
- Ensuring configuration compatibility between the tools
Related
This would complement existing Prettier plugins like prettier-plugin-jsdoc by handling general comment formatting while JSDoc-specific plugins handle documentation structure.
Metadata
Metadata
Assignees
Labels
No labels