-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to set indent depth of closing brackets #502
Add option to set indent depth of closing brackets #502
Conversation
tests/options/pugClosingBracketIndentDepth/pug-closing-bracket-indent-depth.test.ts
Outdated
Show resolved
Hide resolved
tests/options/pugClosingBracketIndentDepth/pug-closing-bracket-indent-depth.test.ts
Outdated
Show resolved
Hide resolved
Test names fixed 🙏 |
Looks like I mistakenly didn't commit in an unformatted input file for the tests, thus failing them for CI. Fixed. 🤦♂️ |
I'll have a last in-depth look tomorrow |
Add an option to set the indent depth of closing brackets
Thanks for the cleanup commit. It makes sense. Unfortunately I literally can't see the UI for enabling upstream commits as per Github's documentation. Maybe our org has some global setting to disable it. Should have forked on my personal account instead. Sorry about that 😅 |
Yeah that's it, it needs to be from a non-org account 👌 |
Merging this now, but I need to cleanup some more things before the next release. So potentially a release could come around weekend, depending on how much time I can spend. |
Closes #501
Adds a new option to modify how deep the closing brackets are indented when
bracketSameLine
is not used. Defaults (= null) to the current behavior and allows the choices of0
(current default) or1
(indent by +1).I chose to add the feature as a numeric depth parameter instead of a true/false flag because it's a good way to communicate the feature, and there seem to be issues with passing booleans into Prettier plugins. Added tests to verify the new option.
Feedback is very much welcome if this approach makes sense!