@prettier/plugin-ruby
Advanced tools
Changelog
[1.2.3] - 2021-01-02
if..else..end
within a command_call
node that parentheses are added.do
keyword on while
and until
loops so that it doesn't confuse the parser.for
loops that have multiple index variables.not
unary operator.Changelog
[1.2.2] - 2021-01-01
command_call
nodes with unary operators incorrectly parse their operator.Changelog
[1.2.1] - 2020-12-27
Changelog
[1.2.0] - 2020-12-26
fndptn
node for Ruby 3.0 pattern matching.Changelog
[1.1.0] - 2020-12-20
# prettier-ignore
comments.call
syntax with no arguments.Changelog
[1.0.1] - 2020-12-12
Changelog
[1.0.0] - 2020-12-11
Changelog
[1.0.0-rc2] - 2020-12-10
o
or not using o
for octal numbers.when
clauses with multiple predicates that can be split into multiple lines are split correctly.toProc
checks by not calling if the option is disabled.method_add_block
to the potential like of method calls that can be chained.rubyArrayLiteral
option for disabling automatically turning into array literals.Changelog
[1.0.0-rc1] - 2020-12-09
addTrailingCommas
-> trailingComma
, "es5"
means true
inlineConditionals
and inlineLoops
-> rubyModifier
preferHashLabels
-> rubyHashLabel
preferSingleQuotes
-> rubySingleQuote
toProcTransform
-> rubyToProc
2.5.1
dyna_symbols. Turns out they were previously incorrectly reported as xstring
nodes.rescue
nodes with only comments in the body.def foo # :nodoc:
bar
end
The comment in the above example should stay in place.
a.(1, 2, 3)
should remain the same.ensure
being used in a bodystmt
and not a begin
.-4..-3
.alias << push
.!!foo&.bar
.begin
rescue Foo, Bar
# comment
end
%Q
.break
with comments immediately after.alias in within
.alias in IN
.rescue
comments stay on the same line as their declaration.Changelog
[0.22.0] - 2020-12-08
inlineConditionals: false
.not
keeps parentheses if they are being used.hshptn
and the remaining missing pattern matching syntax.