l10ns icon indicating copy to clipboard operation
l10ns copied to clipboard

Unable to parse with break lines and trailing commas

Open krailler opened this issue 7 years ago • 2 comments

I use airbnb eslint, and it use the following rule: http://eslint.org/docs/rules/comma-dangle

I am writing code with trailing commas but l10ns can't parse it...

return l(
    'my->super->string',
    { playerName: 'playername' },   <<-- WITH COMMA UPDATE WAS FAILED
)

l10ns only parse if has not trailing commas

return l(
    'my->super->string',
    { playerName: 'playername' }
)

Any help or update? PD: Sorry for my english

krailler avatar May 24 '17 11:05 krailler

Unfortunately, l10ns doesn't support trailing commas right now. Though, in the next version we will have an embedded JS parser to deal with this.

tinganho avatar May 29 '17 12:05 tinganho

@krailler - you are invoking the l function here .. how comes your eslint includes an extra comma? Have you taken a look at prettier yet?

qborreda avatar Jun 12 '17 10:06 qborreda