Skip to content

feat: add alignValues option#102

Merged
JoshuaKGoldberg merged 4 commits intodmnd:mainfrom
PaperStrike:feat/opt-align-values
Sep 3, 2025
Merged

feat: add alignValues option#102
JoshuaKGoldberg merged 4 commits intodmnd:mainfrom
PaperStrike:feat/opt-align-values

Conversation

@PaperStrike
Copy link
Copy Markdown
Contributor

PR Checklist

Overview

This PR implements the alignValues option for dedent() to handle interpolated values with proper indentation alignment. When enabled via dedent({ alignValues: true }), the function will align each interpolated value's indentation to match its starting line's indentation within the template literal.

And added a basic test for nested interpolated string.

Copy link
Copy Markdown
Collaborator

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

The logic all looks great, thanks for the quick PR! 🔥

I'd like to only block on one point: adding docs to the README.md. The other two I don't think should block merging the PR at all.

@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for author Needs an action taken by the original poster label Aug 21, 2025
@github-actions github-actions bot removed the status: waiting for author Needs an action taken by the original poster label Aug 28, 2025
@gabriel-moresco
Copy link
Copy Markdown

Any update?

Copy link
Copy Markdown
Collaborator

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Looking great, thanks a bunch! ✨

@JoshuaKGoldberg JoshuaKGoldberg merged commit 304d0fc into dmnd:main Sep 3, 2025
11 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

🎉 This is included in version v1.7.0 🎉

The release is available on:

Cheers! 📦🚀

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.

Add an option to recursively dedent nested template literal strings

3 participants