question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Erroneous output with upcoming Records syntax

See original GitHub issue

Description

Records are a new primitives in Javascript, and they are currently being implemented in Firefox (See https://bugzilla.mozilla.org/show_bug.cgi?id=1658309, https://bugzilla.mozilla.org/show_bug.cgi?id=1774360 and https://github.com/tc39/proposal-record-tuple)

Records are instantiated like objects, but with a hash before the curly bracket, e.g. #{ hello: "world" }

Input

The code looked like this before beautification:

#{ hello: "world" }

Expected Output

The code should have looked like this after beautification:

#{ 
  hello: "world"
}

Actual Output

The code actually looked like this after beautification:

# { 
  hello: "world"
}

Notice the space between # and {. If the output would be evaluated, it would result in a SyntaxError

Steps to Reproduce

Environment

OS: OSX

Settings

Default settings, I ran echo "#{hello: 'world'}" | npx js-beautify


Let me know if I can be of any help

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
antoniusanggitocommented, Nov 18, 2022

I’m creating a new pull request continuing from the previous PR by @cwthedev because I have no permission to push into his actual branch. You can close his previous PR @bitwiseman, I’m sure to finish my PR in several days. ^^

0reactions
antoniusanggitocommented, Nov 16, 2022

Yes, I’m working on it

Read more comments on GitHub >

github_iconTop Results From Across the Web

IEB717I - IBM
INPUT RECORD SIZE EXCEEDS SPECIFIED OUTPUT RECORD SIZE. ... Syntax checking of the remainder of the utility control statements in this set continues, ......
Read more >
Chapter 2: Syntax Checking Error Messages - Micro Focus
Chapter 2: Syntax Checking Error Messages. These messages are output when the compiler is checking your COBOL program for syntax and consistency.
Read more >
FAQ: What is the Syntax Error Output group in IDoc Prepare ...
The Syntax Error Output Group provides the option to write the erroneous IDoc data in a separate group in case of a syntax...
Read more >
php - SQL syntax error while getting the last records of the each user ...
SQL syntax error while getting the last records of the each user from the multiple tables, Also not getting the output · "...
Read more >
7 Common GROUP BY Errors - LearnSQL.com
most SQL engines will give you an error. Some engines, however, will output weird, unwanted results. I'm using MySQL and when I run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found