Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prettier/plugin-ruby

Package Overview
Dependencies
Maintainers
12
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prettier/plugin-ruby - npm Package Compare versions

Comparing version 1.6.1 to 2.0.0-rc1

dist/haml/embed.js

609

CHANGELOG.md

@@ -9,2 +9,24 @@ # Changelog

## [2.0.0-rc1]
### Added
- [#949](https://github.com/prettier/plugin-ruby/pull/949) - kddnewton - Converted over to using TypeScript for development.
### Changed
- [#958](https://github.com/prettier/plugin-ruby/issues/958) - mharris-figma, kddnewton - Handle optional `do` keyword in `for` loop expressions.
- [#926](https://github.com/prettier/plugin-ruby/issues/926) - jscheid, kddnewton - Better error handling in case certain expected keywords or operators are missing.
- [#819](https://github.com/prettier/plugin-ruby/issues/819) - coisnepe, kddnewton - Ensure that comments placed immediately after the left parenthesis of a method definition are not moved into the body of the methods.
- [#957](https://github.com/prettier/plugin-ruby/issues/957) - azz, kddnewton - Make it so that the format pragma does not have to be on the first line of the file.
- [#895](https://github.com/prettier/plugin-ruby/issues/895) - rsslldnphy, kddnewton - Ensure quotes are properly escaped in the content of a hash value for HAML attributes.
- [#900](https://github.com/prettier/plugin-ruby/issues/900) - rsslldnphy, kddnewton - Ensure that in a HAML line where you have interpolation inside of a tag content that you print it properly.
- [#929](https://github.com/prettier/plugin-ruby/issues/929) - ryanb, kddnewton - Deeply nested blocks should not break their call chains.
- [#935](https://github.com/prettier/plugin-ruby/pull/935) - nbudin, mlauter - Ensure embedded formatting heredocs are properly indented.
- [#975](https://github.com/prettier/plugin-ruby/pull/975) - kddnewton - Refactor the way we determine how to connect to the parser server.
### Removed
- [#976](https://github.com/prettier/plugin-ruby/pull/976) - kddnewton - Remove the `rubyNetcatCommand` option, as it should no longer be necessary.
## [1.6.1] - 2021-06-30

@@ -14,7 +36,7 @@

- [#862](https://github.com/prettier/plugin-ruby/issues/862) - azz, kddeisz - Group together `.where.not` calls in method chains.
- [#863](https://github.com/prettier/plugin-ruby/issues/863) - azz, kddeisz - Fix up Sorbet `sig` block formatting when chaining method calls.
- [#908](https://github.com/prettier/plugin-ruby/issues/908) - Hansenq, kddeisz - Method chains with blocks should be properly indented.
- [#916](https://github.com/prettier/plugin-ruby/issues/916) - pbrisbin, kddeisz - Ensure all of the necessary files are present in the gem.
- [#917](https://github.com/prettier/plugin-ruby/issues/917) - jscheid, kddeisz - Ensure hash keys with dynamic symbols don't strip their quotes.
- [#862](https://github.com/prettier/plugin-ruby/issues/862) - azz, kddnewton - Group together `.where.not` calls in method chains.
- [#863](https://github.com/prettier/plugin-ruby/issues/863) - azz, kddnewton - Fix up Sorbet `sig` block formatting when chaining method calls.
- [#908](https://github.com/prettier/plugin-ruby/issues/908) - Hansenq, kddnewton - Method chains with blocks should be properly indented.
- [#916](https://github.com/prettier/plugin-ruby/issues/916) - pbrisbin, kddnewton - Ensure all of the necessary files are present in the gem.
- [#917](https://github.com/prettier/plugin-ruby/issues/917) - jscheid, kddnewton - Ensure hash keys with dynamic symbols don't strip their quotes.

@@ -25,11 +47,11 @@ ## [1.6.0] - 2021-06-23

- [#859](https://github.com/prettier/plugin-ruby/issues/859) - azz, kddeisz - Support the `--insert-pragma` option for the incremental adoption workflow.
- [#904](https://github.com/prettier/plugin-ruby/issues/904) - Hansenq, kddeisz - Support the `%s` symbol literal syntax.
- [#833](https://github.com/prettier/plugin-ruby/issues/883) - kddeisz - Support for prettier >= v2.3.0.
- [#859](https://github.com/prettier/plugin-ruby/issues/859) - azz, kddnewton - Support the `--insert-pragma` option for the incremental adoption workflow.
- [#904](https://github.com/prettier/plugin-ruby/issues/904) - Hansenq, kddnewton - Support the `%s` symbol literal syntax.
- [#833](https://github.com/prettier/plugin-ruby/issues/883) - kddnewton - Support for prettier >= v2.3.0.
### Changed
- [#854](https://github.com/prettier/plugin-ruby/issues/854) - jflinter, kddeisz - Parentheses should not be stripped from optional RBS union types.
- [#888](https://github.com/prettier/plugin-ruby/issues/888) - MaxNotarangelo, kddeisz - Ensure parentheses wrap conditionals that get transformed into the modifier form when they're used within a binary node.
- [#874](https://github.com/prettier/plugin-ruby/issues/874) - yratanov, kddeisz - Ensure that method calls chained onto the ends of blocks still print their arguments.
- [#854](https://github.com/prettier/plugin-ruby/issues/854) - jflinter, kddnewton - Parentheses should not be stripped from optional RBS union types.
- [#888](https://github.com/prettier/plugin-ruby/issues/888) - MaxNotarangelo, kddnewton - Ensure parentheses wrap conditionals that get transformed into the modifier form when they're used within a binary node.
- [#874](https://github.com/prettier/plugin-ruby/issues/874) - yratanov, kddnewton - Ensure that method calls chained onto the ends of blocks still print their arguments.
- [#897](https://github.com/prettier/plugin-ruby/pull/897) - Hansenq - Reenable the `Layout/LineLength` rubocop rule in our shipped config so that line lengths for other cops are calculated correctly.

@@ -41,8 +63,8 @@

- [#841](https://github.com/prettier/plugin-ruby/issues/841) - LoganBarnett, kddeisz - Better error messaging for when unix sockets are not supported by netcat.
- [#844](https://github.com/prettier/plugin-ruby/issues/844) - andyw8, kddeisz - Ensure we ship all of the parsers with the prettier gem so that `rbprettier` can parse other languages as well.
- [#847](https://github.com/prettier/plugin-ruby/issues/847) - jflinter, kddeisz - Ensure parentheses are present on union return types in RBS.
- [#850](https://github.com/prettier/plugin-ruby/issues/850) - maethub, kddeisz - Ensure double quotes are used even when single quotes are requested for HAML attribute values.
- [#849](https://github.com/prettier/plugin-ruby/issues/849) - indirect, kddeisz - Support HAML version <= 5.1 multi-line attributes.
- [#810](https://github.com/prettier/plugin-ruby/issues/810) - valscion, kddeisz - Make it so that brace blocks containing heredocs have the correct end line so that they format subsequent statements correctly.
- [#841](https://github.com/prettier/plugin-ruby/issues/841) - LoganBarnett, kddnewton - Better error messaging for when unix sockets are not supported by netcat.
- [#844](https://github.com/prettier/plugin-ruby/issues/844) - andyw8, kddnewton - Ensure we ship all of the parsers with the prettier gem so that `rbprettier` can parse other languages as well.
- [#847](https://github.com/prettier/plugin-ruby/issues/847) - jflinter, kddnewton - Ensure parentheses are present on union return types in RBS.
- [#850](https://github.com/prettier/plugin-ruby/issues/850) - maethub, kddnewton - Ensure double quotes are used even when single quotes are requested for HAML attribute values.
- [#849](https://github.com/prettier/plugin-ruby/issues/849) - indirect, kddnewton - Support HAML version <= 5.1 multi-line attributes.
- [#810](https://github.com/prettier/plugin-ruby/issues/810) - valscion, kddnewton - Make it so that brace blocks containing heredocs have the correct end line so that they format subsequent statements correctly.

@@ -53,5 +75,5 @@ ## [1.5.4] - 2021-03-17

- [#835](https://github.com/prettier/plugin-ruby/issues/835) - valscion, kddeisz - Array splat operator should not get moved by leading comments.
- [#836](https://github.com/prettier/plugin-ruby/issues/836) - valscion, kddeisz - Array splat operator should not get moved by trailing comments.
- [#821](https://github.com/prettier/plugin-ruby/issues/821) - jscheid, kddeisz - Better error handling when using GNU netcat.
- [#835](https://github.com/prettier/plugin-ruby/issues/835) - valscion, kddnewton - Array splat operator should not get moved by leading comments.
- [#836](https://github.com/prettier/plugin-ruby/issues/836) - valscion, kddnewton - Array splat operator should not get moved by trailing comments.
- [#821](https://github.com/prettier/plugin-ruby/issues/821) - jscheid, kddnewton - Better error handling when using GNU netcat.

@@ -62,5 +84,5 @@ ## [1.5.3] - 2021-02-28

- [#812](https://github.com/prettier/plugin-ruby/issues/812) - valscion, kddeisz - Splats and blocks within args that have comments attached should place their respective operators in the right place.
- [#812](https://github.com/prettier/plugin-ruby/issues/812) - valscion, kddnewton - Splats and blocks within args that have comments attached should place their respective operators in the right place.
- [#816](https://github.com/prettier/plugin-ruby/pull/816) - valscion - Document RuboCop's Style/Lambda should be disabled
- [#814](https://github.com/prettier/plugin-ruby/issues/814) - jscheid, kddeisz - Provide better errors when the source location of the error is known.
- [#814](https://github.com/prettier/plugin-ruby/issues/814) - jscheid, kddnewton - Provide better errors when the source location of the error is known.

@@ -71,3 +93,3 @@ ## [1.5.2] - 2021-02-03

- kddeisz - Fix up `binary` node comparison operators so that it will handle either Symbol literals or the `@op` nodes which are incorrectly coming from JRuby (https://github.com/jruby/jruby/issues/6548).
- kddnewton - Fix up `binary` node comparison operators so that it will handle either Symbol literals or the `@op` nodes which are incorrectly coming from JRuby (https://github.com/jruby/jruby/issues/6548).

@@ -78,5 +100,5 @@ ## [1.5.1] - 2021-01-27

- [#799](https://github.com/prettier/plugin-ruby/issues/799) - jscheid, kddeisz - Multi-byte characters shouldn't give invalid source string bounds.
- [#801](https://github.com/prettier/plugin-ruby/issues/801) - jscheid, kddeisz - When converting a conditional to the modifier form, make sure to add parentheses if there is a chained method call.
- [#803](https://github.com/prettier/plugin-ruby/issues/803) - jscheid, kddeisz - Fix `formatWithCursor` support to match new parser format.
- [#799](https://github.com/prettier/plugin-ruby/issues/799) - jscheid, kddnewton - Multi-byte characters shouldn't give invalid source string bounds.
- [#801](https://github.com/prettier/plugin-ruby/issues/801) - jscheid, kddnewton - When converting a conditional to the modifier form, make sure to add parentheses if there is a chained method call.
- [#803](https://github.com/prettier/plugin-ruby/issues/803) - jscheid, kddnewton - Fix `formatWithCursor` support to match new parser format.

@@ -87,11 +109,11 @@ ## [1.5.0] - 2021-01-21

- kddeisz - Add `.rbi` as a file type that we support.
- kddnewton - Add `.rbi` as a file type that we support.
### Changed
- [#795](https://github.com/prettier/plugin-ruby/issues/795) djrodgerspryor, kddeisz - Trailing comments attached to empty arrays should not multiply.
- [#794](https://github.com/prettier/plugin-ruby/issues/794) djrodgerspryor, kddeisz - Fix embedded parser parsing by stripping common leading whitespace before passing on the content.
- [#793](https://github.com/prettier/plugin-ruby/issues/793) djrodgerspryor, kddeisz - Do not include trailing commas on arguments within `arg_paren` nodes if they could not be parsed with them (`command` and `command_call`).
- [#788](https://github.com/prettier/plugin-ruby/issues/788) clarkdave, kddeisz - Break child hashes within a multi-line hash regardless of whether or not they can fit on one line.
- kddeisz - Stop using `;` to separate empty class definitions, module definitions, and loops.
- [#795](https://github.com/prettier/plugin-ruby/issues/795) djrodgerspryor, kddnewton - Trailing comments attached to empty arrays should not multiply.
- [#794](https://github.com/prettier/plugin-ruby/issues/794) djrodgerspryor, kddnewton - Fix embedded parser parsing by stripping common leading whitespace before passing on the content.
- [#793](https://github.com/prettier/plugin-ruby/issues/793) djrodgerspryor, kddnewton - Do not include trailing commas on arguments within `arg_paren` nodes if they could not be parsed with them (`command` and `command_call`).
- [#788](https://github.com/prettier/plugin-ruby/issues/788) clarkdave, kddnewton - Break child hashes within a multi-line hash regardless of whether or not they can fit on one line.
- kddnewton - Stop using `;` to separate empty class definitions, module definitions, and loops.

@@ -102,11 +124,11 @@ ## [1.4.0] - 2021-01-15

- ianks, kddeisz - Use `netcat` to communicate to a parser server for better performance when formatting multiple files.
- ianks, kddnewton - Use `netcat` to communicate to a parser server for better performance when formatting multiple files.
### Changed
- jeffcarbs, kddeisz - Long strings with interpolated expressions should only break if the contents in the original source is broken.
- johannesluedke, kddeisz - Fix for rescues with inline comments.
- johncsnyder, kddeisz - Comments should not attach to nodes beyond a double newline.
- blampe, kddeisz - Comments inside of a broken method chain get dropped.
- clarkdave, kddeisz - Don't ignore Sorbet `sig` transformations.
- jeffcarbs, kddnewton - Long strings with interpolated expressions should only break if the contents in the original source is broken.
- johannesluedke, kddnewton - Fix for rescues with inline comments.
- johncsnyder, kddnewton - Comments should not attach to nodes beyond a double newline.
- blampe, kddnewton - Comments inside of a broken method chain get dropped.
- clarkdave, kddnewton - Don't ignore Sorbet `sig` transformations.

@@ -117,4 +139,4 @@ ## [1.3.0] - 2021-01-05

- kddeisz - Handling of the RBS language.
- kddeisz - Incorporate the HAML plugin.
- kddnewton - Handling of the RBS language.
- kddnewton - Incorporate the HAML plugin.

@@ -125,5 +147,5 @@ ## [1.2.5] - 2021-01-04

- nruth, kddeisz - Ensure unary operators on method calls that are sending operators get the correct scanner events.
- cvoege, kddeisz - Do not add parentheses when they're not needed to non-breaking command_calls with ternary arguments.
- valscion, kddeisz - Print method chains more nicely off array and hash literals.
- nruth, kddnewton - Ensure unary operators on method calls that are sending operators get the correct scanner events.
- cvoege, kddnewton - Do not add parentheses when they're not needed to non-breaking command_calls with ternary arguments.
- valscion, kddnewton - Print method chains more nicely off array and hash literals.

@@ -138,4 +160,4 @@ ## [1.2.4] - 2021-01-03

- kddeisz - Reduce JSON size passing from Ruby process to node process by changing `char_start` -> `sc`, `char_end` -> `ec`, `start` -> `sl`, `end` -> `el`.
- kddeisz - Up the max buffer size between the Ruby and node processes to 15K.
- kddnewton - Reduce JSON size passing from Ruby process to node process by changing `char_start` -> `sc`, `char_end` -> `ec`, `start` -> `sl`, `end` -> `el`.
- kddnewton - Up the max buffer size between the Ruby and node processes to 15K.

@@ -146,8 +168,8 @@ ## [1.2.3] - 2021-01-02

- lukyth, kddeisz - Ensure if a ternary breaks into an `if..else..end` within a `command_call` node that parentheses are added.
- AlanFoster, kddeisz - Ensure you consume the optional `do` keyword on `while` and `until` loops so that it doesn't confuse the parser.
- AlanFoster, kddeisz - Ensure key-value pairs split on line when the key has a comment attached within a hash.
- AlanFoster, kddeisz - Fix for `for` loops that have multiple index variables.
- AlanFoster, kddeisz - Fix parsing very large files by reducing the size of the JSON output from the parser.
- AlanFoster, kddeisz - Ensure you don't skip parentheses if you're returning a value with the `not` unary operator.
- lukyth, kddnewton - Ensure if a ternary breaks into an `if..else..end` within a `command_call` node that parentheses are added.
- AlanFoster, kddnewton - Ensure you consume the optional `do` keyword on `while` and `until` loops so that it doesn't confuse the parser.
- AlanFoster, kddnewton - Ensure key-value pairs split on line when the key has a comment attached within a hash.
- AlanFoster, kddnewton - Fix for `for` loops that have multiple index variables.
- AlanFoster, kddnewton - Fix parsing very large files by reducing the size of the JSON output from the parser.
- AlanFoster, kddnewton - Ensure you don't skip parentheses if you're returning a value with the `not` unary operator.

@@ -159,6 +181,6 @@ ## [1.2.2] - 2021-01-01

- nathan-beam - Gem does not work with CMD/Powershell.
- blampe, kddeisz - Comments inside keyword parameters in method declarations are not printed.
- blampe, kddeisz - `command_call` nodes with unary operators incorrectly parse their operator.
- blampe, kddeisz - Returning multiple values where the first has parentheses was incorrectly removing the remaining values.
- johncsnyder, kddeisz - Call chains whose left-most receiver is a no-indent expression should not indent their entire chain.
- blampe, kddnewton - Comments inside keyword parameters in method declarations are not printed.
- blampe, kddnewton - `command_call` nodes with unary operators incorrectly parse their operator.
- blampe, kddnewton - Returning multiple values where the first has parentheses was incorrectly removing the remaining values.
- johncsnyder, kddnewton - Call chains whose left-most receiver is a no-indent expression should not indent their entire chain.

@@ -169,7 +191,7 @@ ## [1.2.1] - 2020-12-27

- kddeisz - Handle single-line method definitions with parameters.
- kddeisz - Handle hash and array patterns nested within find patterns.
- kddeisz - Handle rightward assignment.
- kddeisz - Handle find patterns with named boundaries.
- kddeisz - Handle rightward assignment in conditionals.
- kddnewton - Handle single-line method definitions with parameters.
- kddnewton - Handle hash and array patterns nested within find patterns.
- kddnewton - Handle rightward assignment.
- kddnewton - Handle find patterns with named boundaries.
- kddnewton - Handle rightward assignment in conditionals.

@@ -180,4 +202,4 @@ ## [1.2.0] - 2020-12-26

- kddeisz - Support for the `fndptn` node for Ruby 3.0 pattern matching.
- kddeisz - Support for Ruby 3.0+ single-line method definitions.
- kddnewton - Support for the `fndptn` node for Ruby 3.0 pattern matching.
- kddnewton - Support for Ruby 3.0+ single-line method definitions.

@@ -188,11 +210,11 @@ ## [1.1.0] - 2020-12-20

- kddeisz - Now that the comments are all fixed up, we can support `# prettier-ignore` comments.
- kddnewton - Now that the comments are all fixed up, we can support `# prettier-ignore` comments.
### Changed
- rindek, kddeisz - Do not remove parentheses when receiver looks like a constant.
- rindek, kddeisz - Do not remove parentheses when using the special `call` syntax with no arguments.
- rindek, kddnewton - Do not remove parentheses when receiver looks like a constant.
- rindek, kddnewton - Do not remove parentheses when using the special `call` syntax with no arguments.
- ykpythemind - Do not change regexp bounds if the body has certain content.
- karanmandal, kddeisz - Correctly print for loops.
- rafbm, kddeisz - If there are method chains with arguments only at the end, we should group the method chain and the method args.
- karanmandal, kddnewton - Correctly print for loops.
- rafbm, kddnewton - If there are method chains with arguments only at the end, we should group the method chain and the method args.

@@ -203,3 +225,3 @@ ## [1.0.1] - 2020-12-12

- steobrien, kddeisz - Ensure leading comments in empty array and hash literals do not duplicate.
- steobrien, kddnewton - Ensure leading comments in empty array and hash literals do not duplicate.

@@ -210,7 +232,7 @@ ## [1.0.0] - 2020-12-11

- kddeisz - Do not unescape double quotes in a single quote string.
- kddeisz - Only force braces on regexp for spaces and equals if it's inside a command or command_call.
- kddeisz - Leave Sorbet type annotations in place.
- kddeisz - Don't group hash contents, just allow them to break with their parent node.
- kddeisz - Honor the UTF-8 lang passed in through ENV vars.
- kddnewton - Do not unescape double quotes in a single quote string.
- kddnewton - Only force braces on regexp for spaces and equals if it's inside a command or command_call.
- kddnewton - Leave Sorbet type annotations in place.
- kddnewton - Don't group hash contents, just allow them to break with their parent node.
- kddnewton - Honor the UTF-8 lang passed in through ENV vars.

@@ -221,9 +243,9 @@ ## [1.0.0-rc2] - 2020-12-10

- kddeisz - Print hashes with consistent keys (e.g., if one key cannot be a hash label, use all hash rockets).
- kddeisz - Respect using `o` or not using `o` for octal numbers.
- kddeisz - Ensure `when` clauses with multiple predicates that can be split into multiple lines are split correctly.
- kddeisz - Ensure hash literal is split correctly when only its contents would fit on one line.
- kddeisz - Simplify `toProc` checks by not calling if the option is disabled.
- johncsnyder, kddeisz - Add `method_add_block` to the potential like of method calls that can be chained.
- kddeisz - Add the `rubyArrayLiteral` option for disabling automatically turning into array literals.
- kddnewton - Print hashes with consistent keys (e.g., if one key cannot be a hash label, use all hash rockets).
- kddnewton - Respect using `o` or not using `o` for octal numbers.
- kddnewton - Ensure `when` clauses with multiple predicates that can be split into multiple lines are split correctly.
- kddnewton - Ensure hash literal is split correctly when only its contents would fit on one line.
- kddnewton - Simplify `toProc` checks by not calling if the option is disabled.
- johncsnyder, kddnewton - Add `method_add_block` to the potential like of method calls that can be chained.
- kddnewton - Add the `rubyArrayLiteral` option for disabling automatically turning into array literals.

@@ -234,3 +256,3 @@ ## [1.0.0-rc1] - 2020-12-09

- kddeisz - Rename options to prep for v1.0 release.
- kddnewton - Rename options to prep for v1.0 release.
- `addTrailingCommas` -> `trailingComma`, `"es5"` means `true`

@@ -241,5 +263,5 @@ - `inlineConditionals` and `inlineLoops` -> `rubyModifier`

- `toProcTransform` -> `rubyToProc`
- andyw8, kddeisz - Fix for Ruby `2.5.1` dyna_symbols. Turns out they were previously incorrectly reported as `xstring` nodes.
- andyw8, kddeisz - Fix for plain `rescue` nodes with only comments in the body.
- andyw8, kddeisz - Move declaration-type comments up to the line in the original source, as in:
- andyw8, kddnewton - Fix for Ruby `2.5.1` dyna_symbols. Turns out they were previously incorrectly reported as `xstring` nodes.
- andyw8, kddnewton - Fix for plain `rescue` nodes with only comments in the body.
- andyw8, kddnewton - Move declaration-type comments up to the line in the original source, as in:

@@ -255,7 +277,7 @@ ```ruby

- janklimo - Respect special call syntax, e.g., `a.(1, 2, 3)` should remain the same.
- kddeisz - Fix up a bug with `ensure` being used in a `bodystmt` and not a `begin`.
- kddeisz - Fix up a bug with negative ranges, e.g., `-4..-3`.
- kddeisz - Fix up a bug with operator aliases, e.g., `alias << push`.
- kddeisz - Fix up a bug with calls and unary nodes, e.g., `!!foo&.bar`.
- kddeisz - Fix up a bug with multiple rescue clauses and comments, e.g.,
- kddnewton - Fix up a bug with `ensure` being used in a `bodystmt` and not a `begin`.
- kddnewton - Fix up a bug with negative ranges, e.g., `-4..-3`.
- kddnewton - Fix up a bug with operator aliases, e.g., `alias << push`.
- kddnewton - Fix up a bug with calls and unary nodes, e.g., `!!foo&.bar`.
- kddnewton - Fix up a bug with multiple rescue clauses and comments, e.g.,

@@ -270,15 +292,15 @@ ```ruby

- kddeisz - Handle string literals that start with `%Q`.
- kddeisz - Handle question method methods in the predicate of an if with a comment in the body.
- kddeisz - Fix bare `break` with comments immediately after.
- kddeisz - Fix for heredocs with comments immediately after the declaration.
- kddeisz - Fix for comments when you're defining a method whose name overlaps with a keyword.
- kddeisz - Don't automatically indent inside interpolated expressions from within a heredoc.
- kddeisz - Don't convert into string literal arrays if the elements have brackets.
- kddeisz - Ensure you break the parent when there is an assignment in the predicate of a loop.
- kddeisz - Fix up a bug with keyword aliases, e.g., `alias in within`.
- kddeisz - Force using braces for regex if a regex starts with a blank space.
- kddeisz - Force using braces for regex if a regex starts with an equals sign.
- kddeisz - Fix up a bug with constant aliases, e.g., `alias in IN`.
- andyw8, kddeisz - Ensure `rescue` comments stay on the same line as their declaration.
- kddnewton - Handle string literals that start with `%Q`.
- kddnewton - Handle question method methods in the predicate of an if with a comment in the body.
- kddnewton - Fix bare `break` with comments immediately after.
- kddnewton - Fix for heredocs with comments immediately after the declaration.
- kddnewton - Fix for comments when you're defining a method whose name overlaps with a keyword.
- kddnewton - Don't automatically indent inside interpolated expressions from within a heredoc.
- kddnewton - Don't convert into string literal arrays if the elements have brackets.
- kddnewton - Ensure you break the parent when there is an assignment in the predicate of a loop.
- kddnewton - Fix up a bug with keyword aliases, e.g., `alias in within`.
- kddnewton - Force using braces for regex if a regex starts with a blank space.
- kddnewton - Force using braces for regex if a regex starts with an equals sign.
- kddnewton - Fix up a bug with constant aliases, e.g., `alias in IN`.
- andyw8, kddnewton - Ensure `rescue` comments stay on the same line as their declaration.

@@ -290,11 +312,11 @@ ## [0.22.0] - 2020-12-08

- flyerhzm - Print method chains by one indentation.
- mmcnl, kddeisz - Handle heredocs and blocks being passed to the same method.
- johncsnyder, kddeisz - Ensure correct formatting when breaking up conditionals with `inlineConditionals: false`.
- mmcnl, kddnewton - Handle heredocs and blocks being passed to the same method.
- johncsnyder, kddnewton - Ensure correct formatting when breaking up conditionals with `inlineConditionals: false`.
- Rsullivan00 - Ensure that when ternaries as command arguments get broken into multiple lines we add the necessary parentheses.
- jbielick - Maintain parse order during if/unless modifier expressions
- flyerhzm - Slight prettifying of wrapped args if doc length is under a certain value.
- github0013, kddeisz - Ensure `not` keeps parentheses if they are being used.
- github0013, kddnewton - Ensure `not` keeps parentheses if they are being used.
- jbielick - Print heredocs consistently.
- kddeisz - Completely revamp the way we handle comments.
- kddeisz - Support `hshptn` and the remaining missing pattern matching syntax.
- kddnewton - Completely revamp the way we handle comments.
- kddnewton - Support `hshptn` and the remaining missing pattern matching syntax.

@@ -305,11 +327,11 @@ ## [0.21.0] - 2020-12-02

- kddeisz, ryan-hunter-pc - Explicitly handle `break` and `next` keyword parentheses.
- jbielick, kddeisz - Don't convert between `lambda {}` and `-> {}`. Technically it's breaking the semantics of the program. Also because lambda method call arguments can't handle everything that stabby lambda can.
- kddeisz - Turn off the `Symbol#to_proc` transform by default.
- janklimo, kddeisz - Properly handle trailing commas on hash arguments.
- coiti, kddeisz - Properly handle parentheses when necessary on if/unless statements and while/until loops.
- kddnewton, ryan-hunter-pc - Explicitly handle `break` and `next` keyword parentheses.
- jbielick, kddnewton - Don't convert between `lambda {}` and `-> {}`. Technically it's breaking the semantics of the program. Also because lambda method call arguments can't handle everything that stabby lambda can.
- kddnewton - Turn off the `Symbol#to_proc` transform by default.
- janklimo, kddnewton - Properly handle trailing commas on hash arguments.
- coiti, kddnewton - Properly handle parentheses when necessary on if/unless statements and while/until loops.
- Rsullivan00 - Prevent `command` and `command_call` nodes from being turned into ternaries.
- kddeisz - Better handling of the `alias` node with and without comments.
- kddeisz - Better handling of the `BEGIN` and `END` nodes with and without comments.
- kddeisz - Much better handling of heredocs where now there is a consistent `heredoc` node instead of multiple.
- kddnewton - Better handling of the `alias` node with and without comments.
- kddnewton - Better handling of the `BEGIN` and `END` nodes with and without comments.
- kddnewton - Much better handling of heredocs where now there is a consistent `heredoc` node instead of multiple.

@@ -320,7 +342,7 @@ ## [0.20.1] - 2020-09-04

- ftes, kddeisz - Properly escape HAML plain text statements that start with special HAML characters.
- ftes, kddnewton - Properly escape HAML plain text statements that start with special HAML characters.
### Removed
- kddeisz - I'm stripping out the HAML plugin and putting it into its own package (`@prettier/plugin-haml`). It's become too difficult to maintain within this repo, and it's confusing for contributors because there are some things that work with Ruby and some things that don't. This is going to simplify maintenance. This should probably be a major version bump but since we're still pre `1.0` I'm going to leave it as a patch.
- kddnewton - I'm stripping out the HAML plugin and putting it into its own package (`@prettier/plugin-haml`). It's become too difficult to maintain within this repo, and it's confusing for contributors because there are some things that work with Ruby and some things that don't. This is going to simplify maintenance. This should probably be a major version bump but since we're still pre `1.0` I'm going to leave it as a patch.

@@ -331,3 +353,3 @@ ## [0.20.0] - 2020-08-28

- kddeisz - Allow embedded formatting on heredocs by the name placed at the start. For example,
- kddnewton - Allow embedded formatting on heredocs by the name placed at the start. For example,

@@ -352,5 +374,5 @@ <!-- prettier-ignore -->

- Rsullivan00 - Do not tranform word-literal arrays when there is an escape sequence.
- steobrien, kddeisz - Do not indent heredocs with calls more than they should be.
- steobrien, kddnewton - Do not indent heredocs with calls more than they should be.
- jpickwell - Include .simplecov in filenames
- github0013, kddeisz - Ensure we're parsing ruby files using UTF-8 regardless of the system encoding.
- github0013, kddnewton - Ensure we're parsing ruby files using UTF-8 regardless of the system encoding.

@@ -362,3 +384,3 @@ ## [0.19.0] - 2020-07-03

- ryan-hunter-pc - Add the option to disable the `Symbol#to_proc` transform.
- ryan-hunter-pc], [@SViccari, kddeisz - Disable `Symbol#to_proc` transform when used as a key inside of a hash where the key is either `:if` or `:unless`.
- ryan-hunter-pc], [@SViccari, kddnewton - Disable `Symbol#to_proc` transform when used as a key inside of a hash where the key is either `:if` or `:unless`.

@@ -370,3 +392,3 @@ ## [0.18.2] - 2020-05-01

- alse - Support `vscodeLanguageIds` for HAML.
- ShayDavidson, kddeisz - Don't allow replacing if/else with ternary if there's an assignment in the predicate.
- ShayDavidson, kddnewton - Don't allow replacing if/else with ternary if there's an assignment in the predicate.
- janklimo - Do not add an empty line after `rescue` when the block is empty.

@@ -378,3 +400,3 @@

- petevk, kddeisz - Use braces for block format iff it was originally a brace block, otherwise you could be changing precedence. For example:
- petevk, kddnewton - Use braces for block format iff it was originally a brace block, otherwise you could be changing precedence. For example:

@@ -403,6 +425,6 @@ <!-- prettier-ignore -->

- ftes, kddeisz - When old-form dynamic attributes are added to a `div` tag in HAML, it was previously skipping printing the `%div`, which led to it being incorrectly displayed.
- ftes, kddeisz - Previously if you had a long tag declaration with attributes that made it hit the line limit, then the content of the tag would be pushed to the next line but indented one character too many.
- ftes, kddeisz - Don't explicitly require JSON if it has already been loaded, as this can lead to rubygems activation errors.
- mmainz, kddeisz - Handle heredocs as the receivers of call nodes, as in:
- ftes, kddnewton - When old-form dynamic attributes are added to a `div` tag in HAML, it was previously skipping printing the `%div`, which led to it being incorrectly displayed.
- ftes, kddnewton - Previously if you had a long tag declaration with attributes that made it hit the line limit, then the content of the tag would be pushed to the next line but indented one character too many.
- ftes, kddnewton - Don't explicitly require JSON if it has already been loaded, as this can lead to rubygems activation errors.
- mmainz, kddnewton - Handle heredocs as the receivers of call nodes, as in:

@@ -416,3 +438,3 @@ <!-- prettier-ignore -->

- github0013, kddeisz - Leave parentheses in place if the value of a return node contains a binary with low operator precedence, as in:
- github0013, kddnewton - Leave parentheses in place if the value of a return node contains a binary with low operator precedence, as in:

@@ -428,3 +450,3 @@ <!-- prettier-ignore -->

- kddeisz - Support for the `nokw_param` node for specifying when methods should no accept keywords, as in:
- kddnewton - Support for the `nokw_param` node for specifying when methods should no accept keywords, as in:

@@ -435,3 +457,3 @@ ```ruby

- kddeisz - Support for the `args_forward` node for forwarding all types of arguments, as in:
- kddnewton - Support for the `args_forward` node for forwarding all types of arguments, as in:

@@ -446,3 +468,3 @@ ```ruby

- ftes, kddeisz - Handled 3 or more classes on a node in HAML, as in:
- ftes, kddnewton - Handled 3 or more classes on a node in HAML, as in:

@@ -453,3 +475,3 @@ ```haml

- ftes, kddeisz - Better handling of indentation of `if/elsif/else`, `unless/elsif/else`, and `case/when` branches, as in:
- ftes, kddnewton - Better handling of indentation of `if/elsif/else`, `unless/elsif/else`, and `case/when` branches, as in:

@@ -487,3 +509,3 @@ ```haml

- pje, kddeisz - Method definition bodies (on `defs` nodes) should dedent if a helper method is called. As in:
- pje, kddnewton - Method definition bodies (on `defs` nodes) should dedent if a helper method is called. As in:

@@ -506,3 +528,3 @@ <!-- prettier-ignore -->

- masqita, kddeisz - Inline variable assignment within a predicate should force the conditional to break, as in:
- masqita, kddnewton - Inline variable assignment within a predicate should force the conditional to break, as in:

@@ -517,5 +539,5 @@ ```ruby

- hafley66, kddeisz - Handle empty `while` and `until` blocks.
- Fruetel, kddeisz - Simplify string escape pattern by locking on any escape sequence.
- flyerhzm, kddeisz - Properly handle string quotes on symbols in hash keys.
- hafley66, kddnewton - Handle empty `while` and `until` blocks.
- Fruetel, kddnewton - Simplify string escape pattern by locking on any escape sequence.
- flyerhzm, kddnewton - Properly handle string quotes on symbols in hash keys.

@@ -527,3 +549,3 @@ ## [0.17.0] - 2019-12-12

- matt-wratt - Better support for explicit `return` nodes with empty arrays or arrays with a single element.
- jrdioko, kddeisz - Alignment of `not_to` is explicitly allowed to not indent to better support rspec.
- jrdioko, kddnewton - Alignment of `not_to` is explicitly allowed to not indent to better support rspec.

@@ -538,3 +560,3 @@ ### Changed

- mmainz, kddeisz - Support for extra commas in multiple assignment, as it changes the meaning. For example,
- mmainz, kddnewton - Support for extra commas in multiple assignment, as it changes the meaning. For example,

@@ -548,8 +570,8 @@ <!-- prettier-ignore -->

- kddeisz - Experimental support for the HAMtemplate language.
- kddnewton - Experimental support for the HAMtemplate language.
### Changed
- github0013, kddeisz - Support proper string escaping when the original string in the source is wrapped in `%q|...|`. For example, `%q|\'|` should get printed as `"\'"`, where previously it was dropping the backslash.
- jamescostian, kddeisz - Force ternary breaking when using the lower-precendence operators `and` and `or`. For example,
- github0013, kddnewton - Support proper string escaping when the original string in the source is wrapped in `%q|...|`. For example, `%q|\'|` should get printed as `"\'"`, where previously it was dropping the backslash.
- jamescostian, kddnewton - Force ternary breaking when using the lower-precendence operators `and` and `or`. For example,

@@ -567,3 +589,3 @@ <!-- prettier-ignore -->

- localhostdotdev], [@joeyjoejoejr], [@eins78, kddeisz - Better support for embedded expressions inside heredocs. For example,
- localhostdotdev], [@joeyjoejoejr], [@eins78, kddnewton - Better support for embedded expressions inside heredocs. For example,

@@ -581,3 +603,3 @@ <!-- prettier-ignore -->

- jamescostian, kddeisz - Fix up `return` node printing. When returning multiple values, you need to return an array literal as opposed to using parentheses.
- jamescostian, kddnewton - Fix up `return` node printing. When returning multiple values, you need to return an array literal as opposed to using parentheses.

@@ -589,3 +611,3 @@ ## [0.15.1] - 2019-11-05

- AlanFoster - Add `bin/lex` for viewing the tokenized result of Ripper on Ruby code.
- jakeprime, kddeisz - When predicates from within an `if`, `unless`, `while`, or `until` loop break the line, they should be aligned together. For example,
- jakeprime, kddnewton - When predicates from within an `if`, `unless`, `while`, or `until` loop break the line, they should be aligned together. For example,

@@ -617,3 +639,3 @@ <!-- prettier-ignore -->

- mmainz, kddeisz - Hash keys are not converted to keyword syntax if they would make invalid symbols. For example,
- mmainz, kddnewton - Hash keys are not converted to keyword syntax if they would make invalid symbols. For example,

@@ -627,5 +649,5 @@ <!-- prettier-ignore -->

- cldevs, kddeisz - Do not attempt to format the insides of xstring literals (string that get sent to the command line surrounded by backticks or `%x`).
- cldevs, kddeisz - When predicates for `if`, `unless`, `while`, or `until` nodes contain an assignment, we can't know for sure that it doesn't modify the body. In this case we need to always break and form a multi-line block.
- MarcManiez, kddeisz - When the return value of `if`, `unless`, `while`, or `until` nodes are assigned to anything other than a local variable, we need to wrap them in parentheses if we're changing to the modifier form. This is because the following expressions have different semantic meaning:
- cldevs, kddnewton - Do not attempt to format the insides of xstring literals (string that get sent to the command line surrounded by backticks or `%x`).
- cldevs, kddnewton - When predicates for `if`, `unless`, `while`, or `until` nodes contain an assignment, we can't know for sure that it doesn't modify the body. In this case we need to always break and form a multi-line block.
- MarcManiez, kddnewton - When the return value of `if`, `unless`, `while`, or `until` nodes are assigned to anything other than a local variable, we need to wrap them in parentheses if we're changing to the modifier form. This is because the following expressions have different semantic meaning:

@@ -653,4 +675,4 @@ <!-- prettier-ignore -->

- dudeofawesome, kddeisz - If xstring literals (command line calls surrounded by backticks) break, then we indent and place the command on a new line. Previously, this was resulting in new lines getting added each time the code was formatted. Now this happens correctly.
- krachtstefan, kddeisz - When a `while` or `until` loop modifies a `begin...end` statement, it must remain in the modifier form or else it changes sematic meaning. For example,
- dudeofawesome, kddnewton - If xstring literals (command line calls surrounded by backticks) break, then we indent and place the command on a new line. Previously, this was resulting in new lines getting added each time the code was formatted. Now this happens correctly.
- krachtstefan, kddnewton - When a `while` or `until` loop modifies a `begin...end` statement, it must remain in the modifier form or else it changes sematic meaning. For example,

@@ -675,4 +697,4 @@ <!-- prettier-ignore -->

- jviney], kddeisz - When transforming a block into the `Symbol#to_proc` syntax from within a list of arguments inside of an `aref` node (i.e., `foo[:bar.each`), we can't put the block syntax inside the brackets.
- jakeprime, kddeisz - Values for the `return` keyword that broke the line were previously just printed as they were, which breaks if you have a block expression like an `if` or `while`. For example,
- jviney], kddnewton - When transforming a block into the `Symbol#to_proc` syntax from within a list of arguments inside of an `aref` node (i.e., `foo[:bar.each`), we can't put the block syntax inside the brackets.
- jakeprime, kddnewton - Values for the `return` keyword that broke the line were previously just printed as they were, which breaks if you have a block expression like an `if` or `while`. For example,

@@ -708,3 +730,3 @@ <!-- prettier-ignore -->

- jakeprime, kddeisz - When switching from a double-quoted string to a single-quoted string that contained escaped double quotes, the backslashes would stay in the string. As in:
- jakeprime, kddnewton - When switching from a double-quoted string to a single-quoted string that contained escaped double quotes, the backslashes would stay in the string. As in:

@@ -734,7 +756,7 @@ <!-- prettier-ignore -->

- kddeisz - Support for pattern matching for variables and array patterns. Currently waiting on Ripper support for hash patterns. For examples, check out the [test/js/patterns.test.js](test/js/patterns.test.js) file.
- kddnewton - Support for pattern matching for variables and array patterns. Currently waiting on Ripper support for hash patterns. For examples, check out the [test/js/patterns.test.js](test/js/patterns.test.js) file.
### Changed
- jviney, kddeisz - if/else blocks that had method calls on the end of them that were also transformed into ternaries need to have parens added to them. For example,
- jviney, kddnewton - if/else blocks that had method calls on the end of them that were also transformed into ternaries need to have parens added to them. For example,

@@ -757,4 +779,4 @@ <!-- prettier-ignore -->

- acrewdson, kddeisz - Fixed a bug where multiple newlines at the end of the file would cause a crash.
- jviney, kddeisz - If a variable is assigned inside of the predicate of a conditional, then we can't change it into the single-line version as this breaks. For example,
- acrewdson, kddnewton - Fixed a bug where multiple newlines at the end of the file would cause a crash.
- jviney, kddnewton - If a variable is assigned inside of the predicate of a conditional, then we can't change it into the single-line version as this breaks. For example,

@@ -774,7 +796,7 @@ <!-- prettier-ignore -->

- kddeisz - Added `locStart` and `locEnd` functions to support `--cursor-offset`.
- kddnewton - Added `locStart` and `locEnd` functions to support `--cursor-offset`.
### Changed
- xipgroc, kddeisz - Comments inside of `do...end` blocks that preceeded `call` nodes were associating the comment with the `var_ref` instead of the `call` itself. For example,
- xipgroc, kddnewton - Comments inside of `do...end` blocks that preceeded `call` nodes were associating the comment with the `var_ref` instead of the `call` itself. For example,

@@ -804,3 +826,3 @@ <!-- prettier-ignore -->

- petevk, kddeisz - Double splats inside a hash were previously failing to print. For example,
- petevk, kddnewton - Double splats inside a hash were previously failing to print. For example,

@@ -818,8 +840,8 @@ <!-- prettier-ignore -->

- kddeisz - Move arg, assign, constant, flow, massign, operator, scope, and statement nodes into their own files.
- kddeisz - Move `@int`, `access_ctrl`, `assocsplat`, `block_var`, `else`, `number_arg`, `super`, `undef`, `var_ref`, and `var_ref` as well as various call and symbol nodes into appropriate files.
- kddeisz - Better support for excessed commas in block args. Previously `proc { |x,| }` would add an extra space, but now it does not.
- kddeisz - Add a lot more documentation to the parser.
- glejeune, kddeisz - Previously, the unary `not` operator inside a ternary (e.g., `a ? not(b) : c`) would break because it wouldn't add parentheses, but now it adds them.
- kddeisz - `if` and `unless` nodes used to not be able to handle if a comment was the only statement in the body. For example,
- kddnewton - Move arg, assign, constant, flow, massign, operator, scope, and statement nodes into their own files.
- kddnewton - Move `@int`, `access_ctrl`, `assocsplat`, `block_var`, `else`, `number_arg`, `super`, `undef`, `var_ref`, and `var_ref` as well as various call and symbol nodes into appropriate files.
- kddnewton - Better support for excessed commas in block args. Previously `proc { |x,| }` would add an extra space, but now it does not.
- kddnewton - Add a lot more documentation to the parser.
- glejeune, kddnewton - Previously, the unary `not` operator inside a ternary (e.g., `a ? not(b) : c`) would break because it wouldn't add parentheses, but now it adds them.
- kddnewton - `if` and `unless` nodes used to not be able to handle if a comment was the only statement in the body. For example,

@@ -842,3 +864,3 @@ <!-- prettier-ignore -->

- JoshuaKGoldberg, kddeisz - Fixes an error where `command` nodes within `def` nodes would fail to format if it was only a single block argument. For example,
- JoshuaKGoldberg, kddnewton - Fixes an error where `command` nodes within `def` nodes would fail to format if it was only a single block argument. For example,

@@ -854,3 +876,3 @@ <!-- prettier-ignore -->

- xipgroc, kddeisz - Comments on lines with array references were previously deleting the array references entirely. For example,
- xipgroc, kddnewton - Comments on lines with array references were previously deleting the array references entirely. For example,

@@ -868,4 +890,4 @@ <!-- prettier-ignore -->

- kddeisz - When symbol literal hash keys end with `=`, they cannot be transformed into hash labels.
- xipgroc, kddeisz - Fixed when blocks on methods with no arguments are transformed into `to_proc` syntax.
- kddnewton - When symbol literal hash keys end with `=`, they cannot be transformed into hash labels.
- xipgroc, kddnewton - Fixed when blocks on methods with no arguments are transformed into `to_proc` syntax.

@@ -876,5 +898,5 @@ ## [0.12.1] - 2019-04-22

- kddeisz - If a lambda literal is nested under a `command` or `command_call` node anywhere in the heirarchy, then it needs to use the higher-precedence `{ ... }` braces as opposed to the `do ... end` delimiters.
- jpickwell, kddeisz - Calling `super` with a block and no args was causing the parser to fail when attempting to inspect lambda nodes.
- kddeisz - Support better breaking within interpolation by grouping the interpolated content.
- kddnewton - If a lambda literal is nested under a `command` or `command_call` node anywhere in the heirarchy, then it needs to use the higher-precedence `{ ... }` braces as opposed to the `do ... end` delimiters.
- jpickwell, kddnewton - Calling `super` with a block and no args was causing the parser to fail when attempting to inspect lambda nodes.
- kddnewton - Support better breaking within interpolation by grouping the interpolated content.

@@ -885,3 +907,3 @@ ## [0.12.0] - 2019-04-18

- kddeisz - Automatically convert `lambda { ... }` method calls into `-> { ... }` literals.
- kddnewton - Automatically convert `lambda { ... }` method calls into `-> { ... }` literals.

@@ -892,10 +914,10 @@ ## [0.11.0] - 2019-04-18

- kddeisz - Support for parsing things with a ruby shebang (e.g., `#!/usr/bin/env ruby` or `#!/usr/bin/ruby`).
- kddeisz - Big tests refactor.
- kddeisz - Make multiple `when` predicates break at 80 chars and then wrap to be inline with the other predicates.
- kddeisz - Automatically add underscores in large numbers that aren't already formatted.
- kddnewton - Support for parsing things with a ruby shebang (e.g., `#!/usr/bin/env ruby` or `#!/usr/bin/ruby`).
- kddnewton - Big tests refactor.
- kddnewton - Make multiple `when` predicates break at 80 chars and then wrap to be inline with the other predicates.
- kddnewton - Automatically add underscores in large numbers that aren't already formatted.
- AlanFoster - Better support for inline access control modifiers.
- jpickwell, kddeisz - Better support for heredocs in hash literals.
- kddeisz - Better support for heredocs in array literals.
- kddeisz - Support automatically transforming `def/begin/rescue/end/end` into `def/rescue/end`.
- jpickwell, kddnewton - Better support for heredocs in hash literals.
- kddnewton - Better support for heredocs in array literals.
- kddnewton - Support automatically transforming `def/begin/rescue/end/end` into `def/rescue/end`.

@@ -905,11 +927,11 @@ ### Changed

- deecewan - Fixed support for dynamic string hash keys.
- kddeisz - Moved `case/when` into its own file and added better documentation.
- kddeisz - Moved `begin/rescue` into its own file.
- kddnewton - Moved `case/when` into its own file and added better documentation.
- kddnewton - Moved `begin/rescue` into its own file.
- AlanFoster - Automatically add newlines around access modifiers.
- kddeisz - Alignment of command calls with arguments is fixed.
- aaronjensen, kddeisz - Alignment of `to` is explicitly allowed to not indent to better support rspec.
- kddeisz - Fix up the `to_proc` transform so that it works with other argument handling appropriately.
- kddeisz - Fixed regression on regexp comments.
- CodingItWrong, kddeisz - Fix up block delimiters when nested inside a `command` or `command_call` node.
- kddeisz - Moved hashes into its own file.
- kddnewton - Alignment of command calls with arguments is fixed.
- aaronjensen, kddnewton - Alignment of `to` is explicitly allowed to not indent to better support rspec.
- kddnewton - Fix up the `to_proc` transform so that it works with other argument handling appropriately.
- kddnewton - Fixed regression on regexp comments.
- CodingItWrong, kddnewton - Fix up block delimiters when nested inside a `command` or `command_call` node.
- kddnewton - Moved hashes into its own file.

@@ -920,9 +942,9 @@ ## [0.10.0] - 2019-03-25

- kddeisz - Support for block-local variables.
- kddeisz - Support for dyna-symbols that are using single quotes.
- kddnewton - Support for block-local variables.
- kddnewton - Support for dyna-symbols that are using single quotes.
### Changed
- kddeisz - Force method calls after arrays, blocks, hashes, and xstrings to hang onto the end of the previous nodes.
- kddeisz - Check before anything else for an invalid ruby version.
- kddnewton - Force method calls after arrays, blocks, hashes, and xstrings to hang onto the end of the previous nodes.
- kddnewton - Check before anything else for an invalid ruby version.

@@ -933,4 +955,4 @@ ## [0.9.1] - 2019-03-24

- kddeisz - Better support string quotes by favoring what the user chose if the string contains escape patterns.
- kddeisz - Better support heredocs within method calls.
- kddnewton - Better support string quotes by favoring what the user chose if the string contains escape patterns.
- kddnewton - Better support heredocs within method calls.

@@ -941,8 +963,8 @@ ## [0.9.0] - 2019-03-18

- kddeisz - Support the `hasPragma` function.
- kddeisz - Support the new `number_arg` node type in Ruby 2.7.
- kddnewton - Support the `hasPragma` function.
- kddnewton - Support the new `number_arg` node type in Ruby 2.7.
### Changed
- kddeisz - Limit the number of nodes that are allowed to turn into ternary expressions.
- kddnewton - Limit the number of nodes that are allowed to turn into ternary expressions.

@@ -953,10 +975,10 @@ ## [0.8.0] - 2019-03-08

- kddeisz - Add `eslint` and fix up existing violations.
- kddnewton - Add `eslint` and fix up existing violations.
- AlanFoster - Add the infra for the `prettier` ruby gem.
- kddeisz - Add a `rake` task for easier process integration for the ruby gem.
- kddeisz - Handle direct interpolation of strings with %w array literals (i.e., `["#{foo}"]` should not be transformed into a %w array).
- kddnewton - Add a `rake` task for easier process integration for the ruby gem.
- kddnewton - Handle direct interpolation of strings with %w array literals (i.e., `["#{foo}"]` should not be transformed into a %w array).
### Changed
- kddeisz - Fix string escaping for hex digit bit patterns when there's only one character after the "x".
- kddnewton - Fix string escaping for hex digit bit patterns when there's only one character after the "x".
- AlanFoster - Don't allow line breaks between brace block params.

@@ -968,7 +990,7 @@ - johnschoeman - Switch over the array.rb test case to minitest.

- AlanFoster - Handle longer command nodes.
- kddeisz - Changed the ruby executable within the `prettier` gem to `rbprettier` for easier autocomplete.
- kddnewton - Changed the ruby executable within the `prettier` gem to `rbprettier` for easier autocomplete.
### Removed
- kddeisz - All instances of the spread (`...`) operator so that we can support older versions of node.
- kddnewton - All instances of the spread (`...`) operator so that we can support older versions of node.

@@ -979,17 +1001,17 @@ ## [0.7.0] - 2019-02-24

- kddeisz - Support checking for escaping within strings to force double quotes (e.g., "\n").
- RossKinsella, kddeisz - Handle cases with empty class and module declarations that need to break.
- kddnewton - Support checking for escaping within strings to force double quotes (e.g., "\n").
- RossKinsella, kddnewton - Handle cases with empty class and module declarations that need to break.
- AlanFoster - Align the `bin/print` and `bin/sexp` APto support `bin/print` taking a filepath.
- AndrewRayCode, kddeisz - Support lambdas that don't break and are inline.
- AndrewRayCode, kddnewton - Support lambdas that don't break and are inline.
- AlanFoster - Switch over the numbers.rb test to minitest.
- AlanFoster - Switch over the kwargs.rb test to minitest.
- AlanFoster - Bail out early if the Ruby input is invalid.
- kddeisz - Support `__END__` content.
- kddnewton - Support `__END__` content.
- AlanFoster - Fix up issue with whitespace being added within regexp that are multiline.
- AlanFoster - Better support for destructuring within multi assignment.
- kddeisz - Switch `next` test over to minitest.
- kddeisz - Handle multiple arguments to `next` with a space between.
- AndrewRayCode, kddeisz - Handle multi-line conditional predicate (should align with keyword).
- aaronjensen, kddeisz - Properly support adding trailing commas with and without blocks.
- AlanFoster, kddeisz - Fix regression of handling comments within arrays on array literals.
- kddnewton - Switch `next` test over to minitest.
- kddnewton - Handle multiple arguments to `next` with a space between.
- AndrewRayCode, kddnewton - Handle multi-line conditional predicate (should align with keyword).
- aaronjensen, kddnewton - Properly support adding trailing commas with and without blocks.
- AlanFoster, kddnewton - Fix regression of handling comments within arrays on array literals.
- AlanFoster - Support multiple arguments to `undef`.

@@ -1001,6 +1023,6 @@

- kddeisz - Switch over `binary` fixture to minitest.
- kddeisz - Reconfigure parser into multiple layer modules so that it's easier to understand and manage.
- kddeisz - Handle comments from within `begin`, `rescue`, `ensure`, `while`, and `until` nodes.
- kddeisz - Properly indent heredocs without taking into account current indentation level.
- kddnewton - Switch over `binary` fixture to minitest.
- kddnewton - Reconfigure parser into multiple layer modules so that it's easier to understand and manage.
- kddnewton - Handle comments from within `begin`, `rescue`, `ensure`, `while`, and `until` nodes.
- kddnewton - Properly indent heredocs without taking into account current indentation level.

@@ -1012,6 +1034,6 @@ ## [0.6.2] - 2019-02-17

- AlanFoster - Handle regexp suffixes.
- kddeisz - Add support for testing the test fixtures with minitest.
- kddeisz - Switch over `alias` and `regexp` tests to minitest.
- aaronjensen, kddeisz - Break up method args to split into multiple lines.
- christoomey, kddeisz - Handle blocks args when trailing commas are on.
- kddnewton - Add support for testing the test fixtures with minitest.
- kddnewton - Switch over `alias` and `regexp` tests to minitest.
- aaronjensen, kddnewton - Break up method args to split into multiple lines.
- christoomey, kddnewton - Handle blocks args when trailing commas are on.

@@ -1022,4 +1044,4 @@ ## [0.6.1] - 2019-02-15

- meleyal, kddeisz - Fix Ruby 2.5 inline comments on `args_add_block` nodes.
- meleyal, kddeisz - Support passing `super()` explicitly with no arguments.
- meleyal, kddnewton - Fix Ruby 2.5 inline comments on `args_add_block` nodes.
- meleyal, kddnewton - Support passing `super()` explicitly with no arguments.

@@ -1030,12 +1052,12 @@ ## [0.6.0] - 2019-02-14

- kddeisz - Handle non UTF-8 comments.
- kddeisz - Handle non UTF-8 identifiers.
- kddeisz - Handle non UTF-8 strings.
- kddeisz - Handle empty parens.
- kddeisz - Handle rescue with splats preceeding the exception names.
- kddnewton - Handle non UTF-8 comments.
- kddnewton - Handle non UTF-8 identifiers.
- kddnewton - Handle non UTF-8 strings.
- kddnewton - Handle empty parens.
- kddnewton - Handle rescue with splats preceeding the exception names.
### Changed
- kddeisz - Use `JSON::fast_generate` to get the s-expressions back from the parser.
- NoahTheDuke, kddeisz - Handle broken lambdas from within `command` and `command_call` nodes.
- kddnewton - Use `JSON::fast_generate` to get the s-expressions back from the parser.
- NoahTheDuke, kddnewton - Handle broken lambdas from within `command` and `command_call` nodes.

@@ -1046,3 +1068,3 @@ ## [0.5.2] - 2019-02-13

- kddeisz - Support embedded expressions within strings that contain only keywords, as in `"#{super}"`.
- kddnewton - Support embedded expressions within strings that contain only keywords, as in `"#{super}"`.

@@ -1053,5 +1075,5 @@ ## [0.5.1] - 2019-02-13

- yuki24, kddeisz - Force `do` blocks that we know have to be `do` blocks to break.
- kmcq, kddeisz - Handle `command` and `command_call` nodes `do` blocks by forcing them to break.
- ashfurrow, kddeisz - Attach comments to full hash association nodes, not just the value.
- yuki24, kddnewton - Force `do` blocks that we know have to be `do` blocks to break.
- kmcq, kddnewton - Handle `command` and `command_call` nodes `do` blocks by forcing them to break.
- ashfurrow, kddnewton - Attach comments to full hash association nodes, not just the value.

@@ -1062,10 +1084,10 @@ ## [0.5.0] - 2019-02-13

- kddeisz - Automatically convert arrays of all string literals to %w arrays.
- kddeisz - Automatically convert arrays of all symbol literals to %i arrays.
- kddnewton - Automatically convert arrays of all string literals to %w arrays.
- kddnewton - Automatically convert arrays of all symbol literals to %i arrays.
### Changed
- kddeisz - Move the `args_add` and `args_new` handling into the parser.
- uri, kddeisz - Change `command_call` nodes to properly indent when broken and to not add a trailing comma.
- kddeisz - Rename the `trailingComma` option to `addTrailingCommas` to not conflict with the JS option.
- kddnewton - Move the `args_add` and `args_new` handling into the parser.
- uri, kddnewton - Change `command_call` nodes to properly indent when broken and to not add a trailing comma.
- kddnewton - Rename the `trailingComma` option to `addTrailingCommas` to not conflict with the JS option.

@@ -1076,5 +1098,5 @@ ## [0.4.1] - 2019-02-12

- kddeisz - Provide the `makeList` utility for the nodes that are lists from within ripper.
- awinograd, kddeisz - Again, this time for real, properly escape strings.
- kddeisz - Fix up trailing commas on command calls.
- kddnewton - Provide the `makeList` utility for the nodes that are lists from within ripper.
- awinograd, kddnewton - Again, this time for real, properly escape strings.
- kddnewton - Fix up trailing commas on command calls.

@@ -1085,7 +1107,7 @@ ## [0.4.0] - 2019-02-12

- Overload119, kddeisz - Support the `trailingComma` configuration option (defaults to `false`).
- Overload119, kddnewton - Support the `trailingComma` configuration option (defaults to `false`).
### Changed
- NoahTheDuke, kddeisz - Pass the code to be formatted over `stdin`.
- NoahTheDuke, kddnewton - Pass the code to be formatted over `stdin`.

@@ -1096,4 +1118,4 @@ ## [0.3.7] - 2019-02-11

- kddeisz - Split up statements even if they started on the same line with `;`s unless they are within an embedded expression.
- kddeisz - Properly handle escaped quotes within strings.
- kddnewton - Split up statements even if they started on the same line with `;`s unless they are within an embedded expression.
- kddnewton - Properly handle escaped quotes within strings.

@@ -1104,4 +1126,4 @@ ## [0.3.6] - 2019-02-10

- AlanFoster, kddeisz - Support the `not` operator properly.
- AlanFoster, kddeisz - Handle comments properly inside `if`, `unless`, and `when` nodes.
- AlanFoster, kddnewton - Support the `not` operator properly.
- AlanFoster, kddnewton - Handle comments properly inside `if`, `unless`, and `when` nodes.

@@ -1112,3 +1134,3 @@ ## [0.3.5] - 2019-02-09

- kddeisz - Handle lonely operators in Ruby `2.5`.
- kddnewton - Handle lonely operators in Ruby `2.5`.

@@ -1119,8 +1141,8 @@ ## [0.3.4] - 2019-02-09

- kddeisz - Comments are now properly attached inside `defs` nodes.
- kddeisz - Support multiple inline comments on nodes.
- kddeisz - Support inline comments from within the `EXPR_END|EXPR_LABEL` lexer state.
- kddnewton - Comments are now properly attached inside `defs` nodes.
- kddnewton - Support multiple inline comments on nodes.
- kddnewton - Support inline comments from within the `EXPR_END|EXPR_LABEL` lexer state.
- cbothner - Stop transforming multistatement blocks with `to_proc`.
- kddeisz - `do` blocks necessarily need to break their parent nodes.
- eins78, kddeisz - Handle `next` node edge case with `args_add` as the body.
- kddnewton - `do` blocks necessarily need to break their parent nodes.
- eins78, kddnewton - Handle `next` node edge case with `args_add` as the body.

@@ -1131,4 +1153,4 @@ ## [0.3.3] - 2019-02-09

- bugthing, kddeisz - Command nodes within conditionals now break parents to disallow them from being turned into ternary expressions.
- awinograd, kddeisz - Properly escape double quotes when using `preferSingleQuotes: false`.
- bugthing, kddnewton - Command nodes within conditionals now break parents to disallow them from being turned into ternary expressions.
- awinograd, kddnewton - Properly escape double quotes when using `preferSingleQuotes: false`.

@@ -1139,5 +1161,5 @@ ## [0.3.2] - 2019-02-09

- kddeisz - Don't define duplicated methods in the parser.
- kddeisz - Let prettier know about `.rb` and `.rake` files so you don't have to specify the parser when running.
- kddeisz - Renamed the package to @prettier/plugin-ruby.
- kddnewton - Don't define duplicated methods in the parser.
- kddnewton - Let prettier know about `.rb` and `.rake` files so you don't have to specify the parser when running.
- kddnewton - Renamed the package to @prettier/plugin-ruby.

@@ -1148,6 +1170,6 @@ ## [0.3.1] - 2019-02-07

- kddeisz - Automatically add parens to method declarations.
- kddeisz - Handle comments on bare hash assocs.
- kddeisz - Handle `method_add_block` nodes where the statements may be nested one more level.
- kddeisz - Handle heredocs nested no matter how many levels deep.
- kddnewton - Automatically add parens to method declarations.
- kddnewton - Handle comments on bare hash assocs.
- kddnewton - Handle `method_add_block` nodes where the statements may be nested one more level.
- kddnewton - Handle heredocs nested no matter how many levels deep.

@@ -1158,13 +1180,13 @@ ## [0.3.0] - 2019-02-07

- kddeisz - Support squiggly heredocs.
- kddeisz - Support straight heredocs.
- kddnewton - Support squiggly heredocs.
- kddnewton - Support straight heredocs.
### Changed
- kddeisz - Ignore current indentation when creating embdocs so that `=begin` is always at the beginning of the line.
- kddeisz - Move `regexp_add` and `regexp_new` handling into the parser.
- kddeisz - Move `xstring_add` and `xstring_new` handling into the parser.
- kddeisz - Move `string_add` and `string_content` handling into the parser.
- kddeisz - Move `mrhs_add` and `mrhs_new` handling into the parser.
- kddeisz - Move `mlhs_add` and `mlhs_new` handling into the parser.
- kddnewton - Ignore current indentation when creating embdocs so that `=begin` is always at the beginning of the line.
- kddnewton - Move `regexp_add` and `regexp_new` handling into the parser.
- kddnewton - Move `xstring_add` and `xstring_new` handling into the parser.
- kddnewton - Move `string_add` and `string_content` handling into the parser.
- kddnewton - Move `mrhs_add` and `mrhs_new` handling into the parser.
- kddnewton - Move `mlhs_add` and `mlhs_new` handling into the parser.

@@ -1175,5 +1197,5 @@ ## [0.2.1] - 2019-02-06

- kddeisz - Handle brace blocks on commands properly.
- kddeisz - Break parent and return `do` blocks when called from a `command` node.
- kddeisz - Handle edge cases with `if` statements where there is no body of the if (so it can't be converted to a ternary).
- kddnewton - Handle brace blocks on commands properly.
- kddnewton - Break parent and return `do` blocks when called from a `command` node.
- kddnewton - Handle edge cases with `if` statements where there is no body of the if (so it can't be converted to a ternary).

@@ -1184,16 +1206,16 @@ ## [0.2.0] - 2019-02-06

- kddeisz - Handle `methref` nodes from Ruby `2.7`.
- kddeisz - Allow `module` nodes to shorten using `;` when the block is empty.
- kddnewton - Handle `methref` nodes from Ruby `2.7`.
- kddnewton - Allow `module` nodes to shorten using `;` when the block is empty.
### Changed
- kddeisz - Handle splat within an array, as in `[1, 2, *foo]`.
- kddeisz - Disallow comments from being attached to intermediary regex nodes.
- kddeisz - Fix `to_proc` transforms to reference the method called as opposed to the parameter name.
- kddeisz - Change statement lists to be generated within the parser instead of the printer, thereby allowing finer control over comments.
- kddeisz - Completely revamp comment parsing by switching off the internal lexer state from `ripper`. This should drastically increase accuracy of comment parsing in general, and set us up for success in the future.
- kddeisz - Allow comments to be attached to `CHAR` nodes.
- kddeisz - Disallow comments from being attached to `args_new` nodes.
- kddeisz - Track start and end lines so we can better insert block comments.
- kddeisz - Handle intermediary array nodes in the parse for better comment handling.
- kddnewton - Handle splat within an array, as in `[1, 2, *foo]`.
- kddnewton - Disallow comments from being attached to intermediary regex nodes.
- kddnewton - Fix `to_proc` transforms to reference the method called as opposed to the parameter name.
- kddnewton - Change statement lists to be generated within the parser instead of the printer, thereby allowing finer control over comments.
- kddnewton - Completely revamp comment parsing by switching off the internal lexer state from `ripper`. This should drastically increase accuracy of comment parsing in general, and set us up for success in the future.
- kddnewton - Allow comments to be attached to `CHAR` nodes.
- kddnewton - Disallow comments from being attached to `args_new` nodes.
- kddnewton - Track start and end lines so we can better insert block comments.
- kddnewton - Handle intermediary array nodes in the parse for better comment handling.

@@ -1204,3 +1226,3 @@ ## [0.1.2] - 2019-02-05

- kddeisz - Handle guard clauses that return with no parens.
- kddnewton - Handle guard clauses that return with no parens.

@@ -1211,7 +1233,7 @@ ## [0.1.1] - 2019-02-05

- kddeisz - Handle class method calls with the `::` operator.
- kddeisz - Handle strings with apostrophes when using `preferSingleQuote`.
- kddeisz - Have travis run multiple ruby versions.
- kddeisz - Explicitly fail if ruby version is < `2.5`.
- kddeisz - Disallow comments from being attached to intermediary string nodes.
- kddnewton - Handle class method calls with the `::` operator.
- kddnewton - Handle strings with apostrophes when using `preferSingleQuote`.
- kddnewton - Have travis run multiple ruby versions.
- kddnewton - Explicitly fail if ruby version is < `2.5`.
- kddnewton - Disallow comments from being attached to intermediary string nodes.

@@ -1224,3 +1246,4 @@ ## [0.1.0] - 2019-02-04

[unreleased]: https://github.com/prettier/plugin-ruby/compare/v1.6.1...HEAD
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v2.0.0-rc1...HEAD
[2.0.0-rc1]: https://github.com/prettier/plugin-ruby/compare/v1.6.1...v2.0.0-rc1
[1.6.1]: https://github.com/prettier/plugin-ruby/compare/v1.6.0...v1.6.1

@@ -1227,0 +1250,0 @@ [1.6.0]: https://github.com/prettier/plugin-ruby/compare/v1.5.5...v1.6.0

@@ -81,12 +81,10 @@ # Contributing

```javascript
const { concat, group, indent, line } = require("prettier").doc.builders;
const { group, indent, line } = require("prettier").doc.builders;
const printBinary = (path, opts, print) =>
group(
concat([
concat([path.call(print, "body", 0), " "]),
path.getValue().body[1],
indent(concat([line, path.call(print, "body", 2)]))
])
);
group([
[path.call(print, "body", 0), " "],
path.getValue().body[1],
indent([line, path.call(print, "body", 2)])
]);
```

@@ -104,3 +102,2 @@

- `concat` - puts multiple nodes together and prints them without breaking them apart
- `group` - marks places where `prettier` could split text if the line gets too long; if the max line length is hit, `prettier` will break apart the outermost `group` node first

@@ -107,0 +104,0 @@ - `indent` - increases the current print indent for the contents of the node if the parent node is broken, e.g., if the `binary` node is too long to fit on one line, it will indent the right-hand operand

{
"name": "@prettier/plugin-ruby",
"version": "1.6.1",
"version": "2.0.0-rc1",
"description": "prettier plugin for the Ruby programming language",
"main": "src/plugin.js",
"main": "dist/plugin.js",
"scripts": {
"check-format": "prettier --check '**/*'",
"checkFormat": "prettier --check '**/*'",
"lint": "eslint --cache .",
"prepublishOnly": "tsc -p tsconfig.build.json && cp src/parser/getInfo.js dist/parser && cp src/parser/netcat.js dist/parser && cp src/parser/server.rb dist/parser && cp src/haml/parser.rb dist/haml && cp src/rbs/parser.rb dist/rbs && cp src/ruby/parser.rb dist/ruby",
"test": "jest"

@@ -15,3 +16,3 @@ },

},
"author": "Kevin Deisz",
"author": "Kevin Newton",
"license": "MIT",

@@ -23,10 +24,18 @@ "bugs": {

"dependencies": {
"prettier": ">=1.10"
"prettier": ">=2.3.0"
},
"devDependencies": {
"@types/jest": "^27.0.1",
"@types/node": "^16.9.1",
"@types/prettier": "^2.3.2",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"eslint": "^7.22.0",
"eslint-config-prettier": "^8.0.0",
"husky": "^6.0.0",
"husky": "^7.0.0",
"jest": "^27.0.1",
"pretty-quick": "^3.1.0"
"pretty-quick": "^3.1.0",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"typescript": "^4.4.3"
},

@@ -36,2 +45,3 @@ "eslintConfig": {

"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"

@@ -44,19 +54,17 @@ ],

},
"parser": "@typescript-eslint/parser",
"rules": {
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
]
"no-unused-vars": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off"
}
},
"jest": {
"globalSetup": "./test/js/globalSetup.js",
"globalTeardown": "./test/js/globalTeardown.js",
"globalSetup": "./test/js/globalSetup.ts",
"globalTeardown": "./test/js/globalTeardown.ts",
"preset": "ts-jest",
"setupFilesAfterEnv": [
"./test/js/setupTests.js"
"./test/js/setupTests.ts"
],
"testRegex": ".test.js$"
"testRegex": ".test.ts$"
},

@@ -63,0 +71,0 @@ "husky": {

@@ -131,14 +131,13 @@ <div align="center">

| API Option | CLI Option | Default | Description |
| ------------------- | ----------------------- | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
| `requirePragma` | `--require-pragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)). |
| `rubyArrayLiteral` | `--ruby-array-literal` | `true` | When possible, favor the use of string and symbol array literals. |
| `rubyHashLabel` | `--ruby-hash-label` | `true` | When possible, uses the shortened hash key syntax, as opposed to hash rockets. |
| `rubyModifier` | `--ruby-modifier` | `true` | When it fits on one line, allows while and until statements to use the modifier form. |
| `rubyNetcatCommand` | `--ruby-netcat-command` | | The prefix of the command to execute to communicate between the node.js process and the Ruby process. (For example, `"nc -U"` or `"telnet -u"`) Normally you should not set this option. |
| `rubySingleQuote` | `--ruby-single-quote` | `true` | When double quotes are not necessary for interpolation, prefers the use of single quotes for string literals. |
| `rubyToProc` | `--ruby-to-proc` | `false` | When possible, convert blocks to the more concise `Symbol#to_proc` syntax. |
| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |
| `trailingComma` | `--trailing-comma` | `"none"` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#trailing-comma)). `"es5"` is equivalent to `true`. |
| API Option | CLI Option | Default | Description |
| ------------------ | ---------------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------ |
| `printWidth` | `--print-width` | `80` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#print-width)). |
| `requirePragma` | `--require-pragma` | `false` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#require-pragma)). |
| `rubyArrayLiteral` | `--ruby-array-literal` | `true` | When possible, favor the use of string and symbol array literals. |
| `rubyHashLabel` | `--ruby-hash-label` | `true` | When possible, uses the shortened hash key syntax, as opposed to hash rockets. |
| `rubyModifier` | `--ruby-modifier` | `true` | When it fits on one line, allows while and until statements to use the modifier form. |
| `rubySingleQuote` | `--ruby-single-quote` | `true` | When double quotes are not necessary for interpolation, prefers the use of single quotes for string literals. |
| `rubyToProc` | `--ruby-to-proc` | `false` | When possible, convert blocks to the more concise `Symbol#to_proc` syntax. |
| `tabWidth` | `--tab-width` | `2` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#tab-width)). |
| `trailingComma` | `--trailing-comma` | `"none"` | Same as in Prettier ([see prettier docs](https://prettier.io/docs/en/options.html#trailing-comma)). `"es5"` is equivalent to `true`. |

@@ -145,0 +144,0 @@ Any of these can be added to your existing [prettier configuration

@@ -5,2 +5,3 @@ // A simple fallback when no netcat-compatible adapter is found on the system.

// eslint-disable-next-line @typescript-eslint/no-var-requires
const { createConnection } = require("net");

@@ -7,0 +8,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc