Skip to content

Introduce plugin/disable_ternary #250

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

Merged

Conversation

davidtaylorhq
Copy link
Contributor

This will prevent the automatic conversion of if ... else to ternary expressions.

This will prevent the automatic conversion of `if ... else` to ternary expressions.
auto-merge was automatically disabled January 26, 2023 16:22

Head branch was pushed to by a user without write access

@davidtaylorhq davidtaylorhq force-pushed the disable-ternary-plugin branch from e3715ca to 82dc9b7 Compare January 26, 2023 16:22
@davidtaylorhq
Copy link
Contributor Author

(fixed up the test failure - sorry about that!)

@kddnewton
Copy link
Member

No worries. I like this plugin and intend to support it, but disable_ternary is not quite clear enough for me. (That sounds like it's going to replace ternaries with if/else.) I'm going to merge it and then rename it to disable_auto_ternary. (Hope that's alright.)

@davidtaylorhq
Copy link
Contributor Author

Hi @kddnewton, would it be possible to get a syntax_tree release with the official version of this plugin? We'd love to move away from our gem-based implementation at Discourse.

@kddnewton
Copy link
Member

Oh no! I thought I did. Sorry about that!

@kddnewton
Copy link
Member

Should be out, let me know if you have problems.

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