plugin-ruby
plugin-ruby copied to clipboard
TypeError: Cannot read property 'type' of undefined
Metadata
- Ruby version: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin17]
- @prettier/plugin-ruby version: 0.12.0
array = [ # comment
0 # comment
]
When I try to format file like ↑this, I get the following error. I found this issue in this file https://github.com/fastlane/fastlane/blob/483cf986bfdd441ec861d6dad9b77b75107f37a4/deliver/lib/deliver/app_screenshot.rb
[error] hoge.rb: TypeError: Cannot read property 'type' of undefined
[error] at propagateBreaksOnEnterFn (/app/node_modules/prettier/bin-prettier.js:12567:13)
[error] at traverseDoc (/app/node_modules/prettier/bin-prettier.js:12425:11)
[error] at Object.propagateBreaks (/app/node_modules/prettier/bin-prettier.js:12592:3)
[error] at printAstToDoc (/app/node_modules/prettier/bin-prettier.js:13546:14)
[error] at coreFormat (/app/node_modules/prettier/bin-prettier.js:13857:16)
[error] at format (/app/node_modules/prettier/bin-prettier.js:14103:73)
[error] at formatWithCursor (/app/node_modules/prettier/bin-prettier.js:14119:12)
[error] at Object.formatWithCursor (/app/node_modules/prettier/bin-prettier.js:42520:15)
[error] at format$1 (/app/node_modules/prettier/bin-prettier.js:43889:21)
[error] at /app/node_modules/prettier/bin-prettier.js:44084:16
All matched files use Prettier code style!
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Closing in favor of #370.