Multiline pipes in JS files cause RuboCop to report "unexpected token tRCURLY"
shepmaster opened this issue · 0 comments
shepmaster commented
Given the file bad.js.haml
:
fn_call(#{1}, |
#{2}, |
{ a: #{3} }); |
haml-lint / RuboCop reports an error:
bad.js.haml:2 [E] RuboCop: Lint/Syntax: unexpected token tRCURLY
(Using Ruby 3.2 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)
For what it's worth, HAML itself renders the document as expected:
t = Haml::Template.new('bad.js.haml')
t.render
# => "fn_call(1, 2, { a: 3 }); \n"