This is a fork of prettier plugin-ruby, which is used in Awesome Code
npm install prettier awesomecode-plugin-ruby
npx prettier *.rb
It removes the following configurations
rubyArrayLiteralrubyHashLabelrubyModifierrubyToProc
It contains the following changes
longarrayname[index]won't be transformed to
longarrayname[index]/abc/won't be transformed to
%r{abc}array.each { |element| element.to_s }won't be transformed to
array.each(&:to_s)['foo']
[:bar]won't be transformed to
%w[foo]
%i[bar]e.g.
if result
'foo'
else
'bar'
endwon't be transformed to
result ? 'foo' : 'bar'e.g.
while true
break :value
endwon't be transformed to
break :value while truee.g.
included do
has_many :build_items, dependent: :destroy
endwon't be transformed to
included { has_many :build_items, dependent: :destroy }