prettier 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/README.md +1 -92
- data/node_modules/prettier/index.js +54 -54
- data/package.json +1 -2
- data/src/ruby/nodes/calls.js +10 -12
- data/src/ruby/nodes/commands.js +7 -2
- data/src/ruby/parser.rb +1 -10
- data/src/utils/noIndent.js +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a18f7e5ef9f61a53a91bda2f64e3e2a1e6e6541676a581a99128f363468b0c4
|
4
|
+
data.tar.gz: 374f7b95865b7ec4cf2bd16276b6c71f8b4bd4f62b34d860a773f3186bf8f308
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b793f8694680859cca6c85b0786e3a4a608b3e0bb8cca23387995b694d03dcc8098821d259e855cb3ff690ceb2fd4d43587423d61945aec5dde8c8a48b4910f4
|
7
|
+
data.tar.gz: cb27a126a66d8ca08319dd45fc9207e7549ea084e0f4c5c787d05c36bc92c300ed396d1d9c8be664d697d625e1901abb907d031dcfdedc518f4c6beb5b0504f2
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.2.5] - 2021-01-04
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- [@nruth], [@kddeisz] - Ensure unary operators on method calls that are sending operators get the correct scanner events.
|
14
|
+
- [@cvoege], [@kddeisz] - Do not add parentheses when they're not needed to non-breaking command_calls with ternary arguments.
|
15
|
+
- [@valscion], [@kddeisz] - Print method chains more nicely off array and hash literals.
|
16
|
+
|
9
17
|
## [1.2.4] - 2021-01-03
|
10
18
|
|
11
19
|
### Added
|
@@ -1020,7 +1028,9 @@ would previously result in `array[]`, but now prints properly.
|
|
1020
1028
|
|
1021
1029
|
- Initial release 🎉
|
1022
1030
|
|
1023
|
-
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v1.2.
|
1031
|
+
[unreleased]: https://github.com/prettier/plugin-ruby/compare/v1.2.5...HEAD
|
1032
|
+
[1.2.5]: https://github.com/prettier/plugin-ruby/compare/v1.2.4...v1.2.5
|
1033
|
+
[1.2.4]: https://github.com/prettier/plugin-ruby/compare/v1.2.3...v1.2.4
|
1024
1034
|
[1.2.3]: https://github.com/prettier/plugin-ruby/compare/v1.2.2...v1.2.3
|
1025
1035
|
[1.2.2]: https://github.com/prettier/plugin-ruby/compare/v1.2.1...v1.2.2
|
1026
1036
|
[1.2.1]: https://github.com/prettier/plugin-ruby/compare/v1.2.0...v1.2.1
|
@@ -1128,6 +1138,7 @@ would previously result in `array[]`, but now prints properly.
|
|
1128
1138
|
[@mmcnl]: https://github.com/mmcnl
|
1129
1139
|
[@nathan-beam]: https://github.com/nathan-beam
|
1130
1140
|
[@noahtheduke]: https://github.com/NoahTheDuke
|
1141
|
+
[@nruth]: https://github.com/nruth
|
1131
1142
|
[@overload119]: https://github.com/Overload119
|
1132
1143
|
[@petevk]: https://github.com/petevk
|
1133
1144
|
[@pje]: https://github.com/pje
|
data/README.md
CHANGED
@@ -154,7 +154,7 @@ prettier --ruby-single-quote false --write '**/*.rb'
|
|
154
154
|
RuboCop and Prettier for Ruby serve different purposes, but there is overlap
|
155
155
|
with some of RuboCop's functionality.
|
156
156
|
|
157
|
-
Prettier provides a RuboCop configuration
|
157
|
+
Prettier provides a RuboCop configuration file to disable the rules which clash.
|
158
158
|
To enable, add the following config at the top of your project's `.rubocop.yml`:
|
159
159
|
|
160
160
|
```yaml
|
@@ -166,97 +166,6 @@ inherit_gem:
|
|
166
166
|
|
167
167
|
Check out our [contributing guide](CONTRIBUTING.md). Bug reports and pull requests are welcome on GitHub at https://github.com/prettier/plugin-ruby.
|
168
168
|
|
169
|
-
### Code
|
170
|
-
|
171
|
-
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
172
|
-
|
173
|
-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
174
|
-
<!-- prettier-ignore-start -->
|
175
|
-
<!-- markdownlint-disable -->
|
176
|
-
<table>
|
177
|
-
<tr>
|
178
|
-
<td align="center"><a href="https://kevindeisz.com"><img src="https://avatars2.githubusercontent.com/u/5093358?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kevin Deisz</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=kddeisz" title="Code">💻</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=kddeisz" title="Documentation">📖</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=kddeisz" title="Tests">⚠️</a> <a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Akddeisz" title="Bug reports">🐛</a></td>
|
179
|
-
<td align="center"><a href="https://www.alanfoster.me/"><img src="https://avatars2.githubusercontent.com/u/1271782?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alan Foster</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=AlanFoster" title="Code">💻</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=AlanFoster" title="Documentation">📖</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=AlanFoster" title="Tests">⚠️</a> <a href="https://github.com/prettier/plugin-ruby/issues?q=author%3AAlanFoster" title="Bug reports">🐛</a></td>
|
180
|
-
<td align="center"><a href="https://github.com/johnschoeman"><img src="https://avatars0.githubusercontent.com/u/16049495?v=4?s=100" width="100px;" alt=""/><br /><sub><b>johnschoeman</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=johnschoeman" title="Tests">⚠️</a></td>
|
181
|
-
<td align="center"><a href="https://twitter.com/aaronjensen"><img src="https://avatars3.githubusercontent.com/u/8588?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aaron Jensen</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=aaronjensen" title="Documentation">📖</a></td>
|
182
|
-
<td align="center"><a href="http://cameronbothner.com"><img src="https://avatars1.githubusercontent.com/u/4642599?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cameron Bothner</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=cbothner" title="Code">💻</a></td>
|
183
|
-
<td align="center"><a href="https://localhost.dev"><img src="https://avatars3.githubusercontent.com/u/47308085?v=4?s=100" width="100px;" alt=""/><br /><sub><b>localhost.dev</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Alocalhostdotdev" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=localhostdotdev" title="Code">💻</a></td>
|
184
|
-
<td align="center"><a href="https://deecewan.github.io"><img src="https://avatars0.githubusercontent.com/u/4755785?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Buchan-Swanson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Adeecewan" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=deecewan" title="Code">💻</a></td>
|
185
|
-
</tr>
|
186
|
-
<tr>
|
187
|
-
<td align="center"><a href="https://github.com/jpickwell"><img src="https://avatars1.githubusercontent.com/u/4682321?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jordan Pickwell</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajpickwell" title="Bug reports">🐛</a></td>
|
188
|
-
<td align="center"><a href="http://codingitwrong.com"><img src="https://avatars0.githubusercontent.com/u/15832198?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Josh Justice</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3ACodingItWrong" title="Bug reports">🐛</a></td>
|
189
|
-
<td align="center"><a href="https://github.com/xipgroc"><img src="https://avatars0.githubusercontent.com/u/28561131?v=4?s=100" width="100px;" alt=""/><br /><sub><b>xipgroc</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Axipgroc" title="Bug reports">🐛</a></td>
|
190
|
-
<td align="center"><a href="http://lejeun.es"><img src="https://avatars1.githubusercontent.com/u/15168?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gregoire Lejeune</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aglejeune" title="Bug reports">🐛</a></td>
|
191
|
-
<td align="center"><a href="https://github.com/petevk"><img src="https://avatars3.githubusercontent.com/u/5108627?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pete Van Klaveren</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Apetevk" title="Bug reports">🐛</a></td>
|
192
|
-
<td align="center"><a href="https://github.com/meleyal"><img src="https://avatars3.githubusercontent.com/u/15045?v=4?s=100" width="100px;" alt=""/><br /><sub><b>meleyal</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=meleyal" title="Documentation">📖</a></td>
|
193
|
-
<td align="center"><a href="https://lip.is"><img src="https://avatars1.githubusercontent.com/u/125676?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lipis</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=lipis" title="Documentation">📖</a></td>
|
194
|
-
</tr>
|
195
|
-
<tr>
|
196
|
-
<td align="center"><a href="https://janpiotrowski.de"><img src="https://avatars0.githubusercontent.com/u/183673?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan Piotrowski</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=janpio" title="Documentation">📖</a></td>
|
197
|
-
<td align="center"><a href="https://www.andywaite.com"><img src="https://avatars1.githubusercontent.com/u/13400?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andy Waite</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=andyw8" title="Documentation">📖</a> <a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aandyw8" title="Bug reports">🐛</a></td>
|
198
|
-
<td align="center"><a href="https://github.com/jviney"><img src="https://avatars3.githubusercontent.com/u/7051?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jonathan Viney</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajviney" title="Bug reports">🐛</a></td>
|
199
|
-
<td align="center"><a href="https://github.com/acrewdson"><img src="https://avatars0.githubusercontent.com/u/10353074?v=4?s=100" width="100px;" alt=""/><br /><sub><b>acrewdson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aacrewdson" title="Bug reports">🐛</a></td>
|
200
|
-
<td align="center"><a href="https://orleans.io"><img src="https://avatars0.githubusercontent.com/u/1683595?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Louis Orleans</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Adudeofawesome" title="Bug reports">🐛</a></td>
|
201
|
-
<td align="center"><a href="https://github.com/cvoege"><img src="https://avatars2.githubusercontent.com/u/6777709?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Colton Voege</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Acvoege" title="Bug reports">🐛</a></td>
|
202
|
-
<td align="center"><a href="https://stefankracht.de"><img src="https://avatars1.githubusercontent.com/u/529711?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stefan Kracht</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Akrachtstefan" title="Bug reports">🐛</a></td>
|
203
|
-
</tr>
|
204
|
-
<tr>
|
205
|
-
<td align="center"><a href="https://github.com/jakeprime"><img src="https://avatars1.githubusercontent.com/u/1019036?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jakeprime</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajakeprime" title="Bug reports">🐛</a></td>
|
206
|
-
<td align="center"><a href="http://mmainz.github.io"><img src="https://avatars2.githubusercontent.com/u/5417714?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mario Mainz</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ammainz" title="Bug reports">🐛</a></td>
|
207
|
-
<td align="center"><a href="http://www.cldevs.com"><img src="https://avatars3.githubusercontent.com/u/38632061?v=4?s=100" width="100px;" alt=""/><br /><sub><b>CL Web Developers</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Acldevs" title="Bug reports">🐛</a></td>
|
208
|
-
<td align="center"><a href="https://twitter.com/github0013"><img src="https://avatars0.githubusercontent.com/u/809378?v=4?s=100" width="100px;" alt=""/><br /><sub><b>github0013</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Agithub0013" title="Bug reports">🐛</a></td>
|
209
|
-
<td align="center"><a href="https://jami.am"><img src="https://avatars1.githubusercontent.com/u/1456118?v=4?s=100" width="100px;" alt=""/><br /><sub><b>James Costian</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajamescostian" title="Bug reports">🐛</a></td>
|
210
|
-
<td align="center"><a href="https://github.com/joeyjoejoejr"><img src="https://avatars0.githubusercontent.com/u/1141502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joe Jackson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajoeyjoejoejr" title="Bug reports">🐛</a></td>
|
211
|
-
<td align="center"><a href="http://178.is"><img src="https://avatars3.githubusercontent.com/u/134942?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Max Albrecht</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aeins78" title="Bug reports">🐛</a></td>
|
212
|
-
</tr>
|
213
|
-
<tr>
|
214
|
-
<td align="center"><a href="https://github.com/matt-wratt"><img src="https://avatars0.githubusercontent.com/u/570030?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Amatt-wratt" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=matt-wratt" title="Code">💻</a></td>
|
215
|
-
<td align="center"><a href="http://vesalaakso.com"><img src="https://avatars2.githubusercontent.com/u/482561?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vesa Laakso</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=valscion" title="Documentation">📖</a></td>
|
216
|
-
<td align="center"><a href="https://github.com/jrdioko"><img src="https://avatars0.githubusercontent.com/u/405288?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jrdioko</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajrdioko" title="Bug reports">🐛</a></td>
|
217
|
-
<td align="center"><a href="http://gin0606.hatenablog.com"><img src="https://avatars2.githubusercontent.com/u/795891?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gin0606</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Agin0606" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=gin0606" title="Code">💻</a></td>
|
218
|
-
<td align="center"><a href="https://github.com/tobyndockerill"><img src="https://avatars1.githubusercontent.com/u/5688326?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tobyn</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=tobyndockerill" title="Code">💻</a></td>
|
219
|
-
<td align="center"><a href="http://ianks.com"><img src="https://avatars0.githubusercontent.com/u/3303032?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ian Ker-Seymer</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=ianks" title="Code">💻</a></td>
|
220
|
-
<td align="center"><a href="https://huangzhimin.com"><img src="https://avatars2.githubusercontent.com/u/66836?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Richard Huang</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=flyerhzm" title="Code">💻</a></td>
|
221
|
-
</tr>
|
222
|
-
<tr>
|
223
|
-
<td align="center"><a href="https://github.com/pje"><img src="https://avatars1.githubusercontent.com/u/319655?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Patrick Ellis</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Apje" title="Bug reports">🐛</a></td>
|
224
|
-
<td align="center"><a href="https://www.piesync.com/"><img src="https://avatars0.githubusercontent.com/u/161271?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Peter De Berdt</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Amasqita" title="Bug reports">🐛</a></td>
|
225
|
-
<td align="center"><a href="https://github.com/hafley66"><img src="https://avatars0.githubusercontent.com/u/6750483?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chris Hafley</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ahafley66" title="Bug reports">🐛</a></td>
|
226
|
-
<td align="center"><a href="http://fruetel.de"><img src="https://avatars1.githubusercontent.com/u/8015212?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Thomas Frütel</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3AFruetel" title="Bug reports">🐛</a></td>
|
227
|
-
<td align="center"><a href="https://github.com/alse"><img src="https://avatars1.githubusercontent.com/u/1160249?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alex Serban</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=alse" title="Code">💻</a></td>
|
228
|
-
<td align="center"><a href="http://sviccari.github.io"><img src="https://avatars3.githubusercontent.com/u/4016985?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stephanie</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=SViccari" title="Code">💻</a></td>
|
229
|
-
<td align="center"><a href="https://github.com/ShayDavidson"><img src="https://avatars1.githubusercontent.com/u/1366521?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shay Davidson</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3AShayDavidson" title="Bug reports">🐛</a></td>
|
230
|
-
</tr>
|
231
|
-
<tr>
|
232
|
-
<td align="center"><a href="https://github.com/ryan-hunter-pc"><img src="https://avatars2.githubusercontent.com/u/13044512?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ryan Hunter</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=ryan-hunter-pc" title="Code">💻</a></td>
|
233
|
-
<td align="center"><a href="https://www.locksteplabs.com/"><img src="https://avatars1.githubusercontent.com/u/7811733?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan Klimo</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/commits?author=janklimo" title="Code">💻</a></td>
|
234
|
-
<td align="center"><a href="http://ricksullivan.net"><img src="https://avatars0.githubusercontent.com/u/3654176?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rick Sullivan</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3ARsullivan00" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=Rsullivan00" title="Code">💻</a></td>
|
235
|
-
<td align="center"><a href="https://twitter.com/steobrien"><img src="https://avatars3.githubusercontent.com/u/1694410?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stephen O'Brien</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Asteobrien" title="Bug reports">🐛</a></td>
|
236
|
-
<td align="center"><a href="https://github.com/nimish-mehta"><img src="https://avatars2.githubusercontent.com/u/2488470?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nimish Mehta</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Animish-mehta" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=nimish-mehta" title="Code">💻</a></td>
|
237
|
-
<td align="center"><a href="https://joshbielick.com/"><img src="https://avatars2.githubusercontent.com/u/1413330?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Josh Bielick</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajbielick" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=jbielick" title="Code">💻</a></td>
|
238
|
-
<td align="center"><a href="https://github.com/coiti"><img src="https://avatars3.githubusercontent.com/u/27384706?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Román Coitiño</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Acoiti" title="Bug reports">🐛</a></td>
|
239
|
-
</tr>
|
240
|
-
<tr>
|
241
|
-
<td align="center"><a href="https://github.com/mmcnl"><img src="https://avatars2.githubusercontent.com/u/1498727?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt McNeil</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ammcnl" title="Bug reports">🐛</a></td>
|
242
|
-
<td align="center"><a href="https://github.com/johncsnyder"><img src="https://avatars2.githubusercontent.com/u/9882099?v=4?s=100" width="100px;" alt=""/><br /><sub><b>John Snyder</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ajohncsnyder" title="Bug reports">🐛</a></td>
|
243
|
-
<td align="center"><a href="https://github.com/rindek"><img src="https://avatars1.githubusercontent.com/u/881209?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jacek Jakubik</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Arindek" title="Bug reports">🐛</a></td>
|
244
|
-
<td align="center"><a href="https://twitter.com/ykpythemind"><img src="https://avatars2.githubusercontent.com/u/22209702?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yukito Ito</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Aykpythemind" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=ykpythemind" title="Code">💻</a></td>
|
245
|
-
<td align="center"><a href="https://studyfied.com/"><img src="https://avatars2.githubusercontent.com/u/45869605?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Karan Mandal</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Akaranmandal" title="Bug reports">🐛</a></td>
|
246
|
-
<td align="center"><a href="http://nathanbeam.codes/"><img src="https://avatars3.githubusercontent.com/u/24681333?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nathan Beam</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Anathan-beam" title="Bug reports">🐛</a> <a href="https://github.com/prettier/plugin-ruby/commits?author=nathan-beam" title="Code">💻</a></td>
|
247
|
-
<td align="center"><a href="https://github.com/blampe"><img src="https://avatars3.githubusercontent.com/u/848843?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bryce Lampe</b></sub></a><br /><a href="https://github.com/prettier/plugin-ruby/issues?q=author%3Ablampe" title="Bug reports">🐛</a></td>
|
248
|
-
</tr>
|
249
|
-
</table>
|
250
|
-
|
251
|
-
<!-- markdownlint-restore -->
|
252
|
-
<!-- prettier-ignore-end -->
|
253
|
-
|
254
|
-
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
255
|
-
|
256
|
-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
257
|
-
|
258
|
-
### Financial
|
259
|
-
|
260
169
|
You can support `prettier/plugin-ruby` [on OpenCollective](https://opencollective.com/prettier-ruby/contribute). Your organization's logo will show up here with a link to your website.
|
261
170
|
|
262
171
|
<!-- prettier-ignore-start -->
|
@@ -5249,19 +5249,19 @@ var errors = {
|
|
5249
5249
|
UndefinedParserError
|
5250
5250
|
};
|
5251
5251
|
|
5252
|
-
/*! *****************************************************************************
|
5253
|
-
Copyright (c) Microsoft Corporation.
|
5254
|
-
|
5255
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
5256
|
-
purpose with or without fee is hereby granted.
|
5257
|
-
|
5258
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
5259
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
5260
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
5261
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
5262
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
5263
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
5264
|
-
PERFORMANCE OF THIS SOFTWARE.
|
5252
|
+
/*! *****************************************************************************
|
5253
|
+
Copyright (c) Microsoft Corporation.
|
5254
|
+
|
5255
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
5256
|
+
purpose with or without fee is hereby granted.
|
5257
|
+
|
5258
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
5259
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
5260
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
5261
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
5262
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
5263
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
5264
|
+
PERFORMANCE OF THIS SOFTWARE.
|
5265
5265
|
***************************************************************************** */
|
5266
5266
|
|
5267
5267
|
/* global Reflect, Promise */
|
@@ -14638,6 +14638,7 @@ function printAstToDoc(ast, options, alignmentSize = 0) {
|
|
14638
14638
|
} // We let JSXElement print its comments itself because it adds () around
|
14639
14639
|
// UnionTypeAnnotation has to align the child without the comments
|
14640
14640
|
|
14641
|
+
|
14641
14642
|
let res;
|
14642
14643
|
|
14643
14644
|
if (printer.willPrintOwnComments && printer.willPrintOwnComments(path, options)) {
|
@@ -14674,7 +14675,6 @@ function printPrettierIgnoredNode(node, options) {
|
|
14674
14675
|
locStart,
|
14675
14676
|
locEnd
|
14676
14677
|
} = options;
|
14677
|
-
|
14678
14678
|
const start = locStart(node);
|
14679
14679
|
const end = locEnd(node);
|
14680
14680
|
|
@@ -24808,11 +24808,11 @@ var ini = createCommonjsModule(function (module, exports) {
|
|
24808
24808
|
});
|
24809
24809
|
|
24810
24810
|
var fs = __importStar(fs__default['default']);
|
24811
|
-
/**
|
24812
|
-
* define the possible values:
|
24813
|
-
* section: [section]
|
24814
|
-
* param: key=value
|
24815
|
-
* comment: ;this is a comment
|
24811
|
+
/**
|
24812
|
+
* define the possible values:
|
24813
|
+
* section: [section]
|
24814
|
+
* param: key=value
|
24815
|
+
* comment: ;this is a comment
|
24816
24816
|
*/
|
24817
24817
|
|
24818
24818
|
|
@@ -24821,9 +24821,9 @@ var ini = createCommonjsModule(function (module, exports) {
|
|
24821
24821
|
param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/,
|
24822
24822
|
comment: /^\s*[#;].*$/
|
24823
24823
|
};
|
24824
|
-
/**
|
24825
|
-
* Parses an .ini file
|
24826
|
-
* @param file The location of the .ini file
|
24824
|
+
/**
|
24825
|
+
* Parses an .ini file
|
24826
|
+
* @param file The location of the .ini file
|
24827
24827
|
*/
|
24828
24828
|
|
24829
24829
|
function parse(file) {
|
@@ -29644,8 +29644,8 @@ var path_1 = createCommonjsModule(function (module, exports) {
|
|
29644
29644
|
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
|
29645
29645
|
|
29646
29646
|
const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
|
29647
|
-
/**
|
29648
|
-
* Designed to work only with simple paths: `dir\\file`.
|
29647
|
+
/**
|
29648
|
+
* Designed to work only with simple paths: `dir\\file`.
|
29649
29649
|
*/
|
29650
29650
|
|
29651
29651
|
function unixify(filepath) {
|
@@ -34268,17 +34268,17 @@ var pattern = createCommonjsModule(function (module, exports) {
|
|
34268
34268
|
exports.isStaticPattern = isStaticPattern;
|
34269
34269
|
|
34270
34270
|
function isDynamicPattern(pattern, options = {}) {
|
34271
|
-
/**
|
34272
|
-
* A special case with an empty string is necessary for matching patterns that start with a forward slash.
|
34273
|
-
* An empty string cannot be a dynamic pattern.
|
34274
|
-
* For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
|
34271
|
+
/**
|
34272
|
+
* A special case with an empty string is necessary for matching patterns that start with a forward slash.
|
34273
|
+
* An empty string cannot be a dynamic pattern.
|
34274
|
+
* For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
|
34275
34275
|
*/
|
34276
34276
|
if (pattern === '') {
|
34277
34277
|
return false;
|
34278
34278
|
}
|
34279
|
-
/**
|
34280
|
-
* When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
|
34281
|
-
* filepath directly (without read directory).
|
34279
|
+
/**
|
34280
|
+
* When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
|
34281
|
+
* filepath directly (without read directory).
|
34282
34282
|
*/
|
34283
34283
|
|
34284
34284
|
|
@@ -34389,17 +34389,17 @@ var pattern = createCommonjsModule(function (module, exports) {
|
|
34389
34389
|
} = picomatch$1.scan(pattern, Object.assign(Object.assign({}, options), {
|
34390
34390
|
parts: true
|
34391
34391
|
}));
|
34392
|
-
/**
|
34393
|
-
* The scan method returns an empty array in some cases.
|
34394
|
-
* See micromatch/picomatch#58 for more details.
|
34392
|
+
/**
|
34393
|
+
* The scan method returns an empty array in some cases.
|
34394
|
+
* See micromatch/picomatch#58 for more details.
|
34395
34395
|
*/
|
34396
34396
|
|
34397
34397
|
if (parts.length === 0) {
|
34398
34398
|
parts = [pattern];
|
34399
34399
|
}
|
34400
|
-
/**
|
34401
|
-
* The scan method does not return an empty part for the pattern with a forward slash.
|
34402
|
-
* This is another part of micromatch/picomatch#58.
|
34400
|
+
/**
|
34401
|
+
* The scan method does not return an empty part for the pattern with a forward slash.
|
34402
|
+
* This is another part of micromatch/picomatch#58.
|
34403
34403
|
*/
|
34404
34404
|
|
34405
34405
|
|
@@ -34804,8 +34804,8 @@ var constants$5 = createCommonjsModule(function (module, exports) {
|
|
34804
34804
|
const SUPPORTED_MINOR_VERSION = 10;
|
34805
34805
|
const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
|
34806
34806
|
const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
|
34807
|
-
/**
|
34808
|
-
* IS `true` for Node.js 10.10 and greater.
|
34807
|
+
/**
|
34808
|
+
* IS `true` for Node.js 10.10 and greater.
|
34809
34809
|
*/
|
34810
34810
|
|
34811
34811
|
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
@@ -35894,9 +35894,9 @@ var matcher = createCommonjsModule(function (module, exports) {
|
|
35894
35894
|
}
|
35895
35895
|
|
35896
35896
|
_fillStorage() {
|
35897
|
-
/**
|
35898
|
-
* The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
|
35899
|
-
* So, before expand patterns with brace expansion into separated patterns.
|
35897
|
+
/**
|
35898
|
+
* The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
|
35899
|
+
* So, before expand patterns with brace expansion into separated patterns.
|
35900
35900
|
*/
|
35901
35901
|
const patterns = utils$3.pattern.expandPatternsWithBraceExpansion(this._patterns);
|
35902
35902
|
|
@@ -35958,12 +35958,12 @@ var partial = createCommonjsModule(function (module, exports) {
|
|
35958
35958
|
|
35959
35959
|
for (const pattern of patterns) {
|
35960
35960
|
const section = pattern.sections[0];
|
35961
|
-
/**
|
35962
|
-
* In this case, the pattern has a globstar and we must read all directories unconditionally,
|
35963
|
-
* but only if the level has reached the end of the first group.
|
35964
|
-
*
|
35965
|
-
* fixtures/{a,b}/**
|
35966
|
-
* ^ true/false ^ always true
|
35961
|
+
/**
|
35962
|
+
* In this case, the pattern has a globstar and we must read all directories unconditionally,
|
35963
|
+
* but only if the level has reached the end of the first group.
|
35964
|
+
*
|
35965
|
+
* fixtures/{a,b}/**
|
35966
|
+
* ^ true/false ^ always true
|
35967
35967
|
*/
|
35968
35968
|
|
35969
35969
|
if (!pattern.complete && levels > section.length) {
|
@@ -36045,8 +36045,8 @@ var deep = createCommonjsModule(function (module, exports) {
|
|
36045
36045
|
}
|
36046
36046
|
|
36047
36047
|
_isSkippedByDeep(basePath, entryPath) {
|
36048
|
-
/**
|
36049
|
-
* Avoid unnecessary depth calculations when it doesn't matter.
|
36048
|
+
/**
|
36049
|
+
* Avoid unnecessary depth calculations when it doesn't matter.
|
36050
36050
|
*/
|
36051
36051
|
if (this._settings.deep === Infinity) {
|
36052
36052
|
return false;
|
@@ -36534,10 +36534,10 @@ async function FastGlob(source, options) {
|
|
36534
36534
|
function stream(source, options) {
|
36535
36535
|
assertPatternsInput(source);
|
36536
36536
|
const works = getWorks(source, stream$5.default, options);
|
36537
|
-
/**
|
36538
|
-
* The stream returned by the provider cannot work with an asynchronous iterator.
|
36539
|
-
* To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
|
36540
|
-
* This affects performance (+25%). I don't see best solution right now.
|
36537
|
+
/**
|
36538
|
+
* The stream returned by the provider cannot work with an asynchronous iterator.
|
36539
|
+
* To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
|
36540
|
+
* This affects performance (+25%). I don't see best solution right now.
|
36541
36541
|
*/
|
36542
36542
|
|
36543
36543
|
return utils$3.stream.merge(works);
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prettier/plugin-ruby",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.5",
|
4
4
|
"description": "prettier plugin for the Ruby programming language",
|
5
5
|
"main": "src/plugin.js",
|
6
6
|
"scripts": {
|
@@ -22,7 +22,6 @@
|
|
22
22
|
"prettier": ">=1.10"
|
23
23
|
},
|
24
24
|
"devDependencies": {
|
25
|
-
"all-contributors-cli": "^6.14.1",
|
26
25
|
"eslint": "^7.8.1",
|
27
26
|
"eslint-config-prettier": "^7.0.0",
|
28
27
|
"husky": "^4.3.5",
|
data/src/ruby/nodes/calls.js
CHANGED
@@ -24,6 +24,12 @@ function printCall(path, opts, print) {
|
|
24
24
|
// call syntax so if `call` is implicit, we don't print it out.
|
25
25
|
const messageDoc = messageNode === "call" ? "" : path.call(print, "body", 2);
|
26
26
|
|
27
|
+
// For certain left sides of the call nodes, we want to attach directly to
|
28
|
+
// the } or end.
|
29
|
+
if (noIndent.includes(receiverNode.type)) {
|
30
|
+
return concat([receiverDoc, operatorDoc, messageDoc]);
|
31
|
+
}
|
32
|
+
|
27
33
|
// The right side of the call node, as in everything including the operator
|
28
34
|
// and beyond.
|
29
35
|
const rightSideDoc = concat([
|
@@ -47,18 +53,10 @@ function printCall(path, opts, print) {
|
|
47
53
|
// If we're at the top of a chain, then we're going to print out a nice
|
48
54
|
// multi-line layout if this doesn't break into multiple lines.
|
49
55
|
if (!chained.includes(parentNode.type) && (node.chain || 0) >= 3) {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
return ifBreak(group(breakDoc), concat([receiverDoc, group(rightSideDoc)]));
|
56
|
-
}
|
57
|
-
|
58
|
-
// For certain left sides of the call nodes, we want to attach directly to
|
59
|
-
// the } or end.
|
60
|
-
if (noIndent.includes(receiverNode.type)) {
|
61
|
-
return concat([receiverDoc, operatorDoc, messageDoc]);
|
56
|
+
return ifBreak(
|
57
|
+
group(indent(concat(node.breakDoc.concat(rightSideDoc)))),
|
58
|
+
concat([receiverDoc, group(rightSideDoc)])
|
59
|
+
);
|
62
60
|
}
|
63
61
|
|
64
62
|
return group(concat([receiverDoc, group(indent(rightSideDoc))]));
|
data/src/ruby/nodes/commands.js
CHANGED
@@ -105,8 +105,13 @@ function printCommandCall(path, opts, print) {
|
|
105
105
|
let breakDoc;
|
106
106
|
|
107
107
|
if (hasTernaryArg(node.body[3])) {
|
108
|
-
parts.
|
109
|
-
|
108
|
+
breakDoc = parts.concat(
|
109
|
+
"(",
|
110
|
+
indent(concat([softline, argDocs])),
|
111
|
+
softline,
|
112
|
+
")"
|
113
|
+
);
|
114
|
+
parts.push(" ");
|
110
115
|
} else if (skipArgsAlign(path)) {
|
111
116
|
parts.push(" ");
|
112
117
|
breakDoc = parts.concat(argDocs);
|
data/src/ruby/parser.rb
CHANGED
@@ -634,10 +634,6 @@ class Prettier::Parser < Ripper
|
|
634
634
|
# foo.(1, 2, 3)
|
635
635
|
#
|
636
636
|
def on_call(receiver, oper, sending)
|
637
|
-
# Make sure we take the operator out of the scanner events so that it
|
638
|
-
# doesn't get confused for a unary operator later.
|
639
|
-
scanner_events.delete(oper)
|
640
|
-
|
641
637
|
ending = sending
|
642
638
|
|
643
639
|
if sending == :call
|
@@ -740,11 +736,6 @@ class Prettier::Parser < Ripper
|
|
740
736
|
# of the method, the operator being used to send the method, the name of
|
741
737
|
# the method, and the arguments being passed to the method.
|
742
738
|
def on_command_call(receiver, oper, ident, args)
|
743
|
-
# Make sure we take the operator out of the scanner events so that it
|
744
|
-
# doesn't get confused for a unary operator later.
|
745
|
-
scanner_events.delete(oper)
|
746
|
-
|
747
|
-
# Grab the ending from either the arguments or the method being sent
|
748
739
|
ending = args || ident
|
749
740
|
|
750
741
|
{
|
@@ -2173,7 +2164,7 @@ class Prettier::Parser < Ripper
|
|
2173
2164
|
# stack. So we need to explicitly disallow those operators.
|
2174
2165
|
index =
|
2175
2166
|
scanner_events.rindex do |scanner_event|
|
2176
|
-
scanner_event[:type] == :@op &&
|
2167
|
+
scanner_event[:type] == :@op && scanner_event[:sc] < value[:sc] &&
|
2177
2168
|
!%w[.. ...].include?(scanner_event[:body])
|
2178
2169
|
end
|
2179
2170
|
|
data/src/utils/noIndent.js
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prettier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Deisz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|