We want to minimize as much as possible the number of options that are available in syntax tree. For
the most part, if users want non-default formatting, they should override the format methods on the specific nodes themselves. However, because of some history with prettier and the fact that folks have become entrenched in their ways, we decided to provide a small amount of configurability.
def initialize( quote: :default, trailing_comma: :default, disable_auto_ternary: :default, target_ruby_version: :default ) @quote = if quote == :default defined?(SINGLE_QUOTES) ? "'" : "\"" else quote end @trailing_comma = if trailing_comma == :default defined?(TRAILING_COMMA) else trailing_comma end @disable_auto_ternary = if disable_auto_ternary == :default defined?(DISABLE_AUTO_TERNARY) else disable_auto_ternary end @target_ruby_version = if target_ruby_version == :default SemanticVersion.new(RUBY_VERSION) else target_ruby_version end end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4