Repository navigation
Add Prettier Plugin Support for Rewrap #71
Replies: 3 comments
|
I too would like this, but I just want to note that (at least for me) the main goal is to at least have a way of running rewrap from a CLI interface for use in automation (e.g. linting in CI etc). Whilst I would also love it to be via a prettier plugin for some of my use cases, I wouldn't want that suggestion to occlude the bigger picture/requirement. It could make sense to abstract out a standalone "native" NPM package with thin reference CLI initially, decoupled from prettier. This is a bit awkward if you happen to use prettier already, but nontheless a step in the right direction that unlocks "a way" to achieve the automation use cases, and is probably significantly less overall effort to implement in the first instance. The "native" package could probably go on to be used in a full fledged prettier impl in future as well, so may make sense an an incremental step. Another reason for this is rewrap supports some languages that (as far as I can tell) prettier does not, or someone hasn't written a language plugin yet, which probably makes the burden quite high. I don't want to hijack this unsolicited though -- if you agree with my sentiment @christopher-buss perhaps we could rename the issue title to be more general in order to invoke discussion/more interest? If not, I will raise this separately and link back :). Thank you. |
|
@adamscybot nice idea about a CLI wrapper - probably lower-hanging fruit to start with. Maybe it's a separate issue indeed? |
|
@adamscybot, @karlhorky and anyone wishing to have Rewrap in command line/shell: #78. |
Uh oh!
There was an error while loading. Please reload this page.
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:
Benefits
Technical Considerations
This would likely involve:
Related
This would complement existing Prettier plugins like prettier-plugin-jsdoc by handling general comment formatting while JSDoc-specific plugins handle documentation structure.
All reactions