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.

[v2] incorrect comment loc info

See original GitHub issue

Initial checklist

Affected packages and versions

2.0.0.next.1

Link to runnable example

No response

Steps to reproduce

{/* First */}

<Story>
  {{
    template: /* HTML */ ``,
  }}
</Story>

print with console.log(JSON.stringify(node.data?.estree.comments || [], null, 2))

Expected behavior

The second comment should start with line: 5, column: 14 and end with line: 5, column: 24

Actual behavior

[
  {
    "type": "Block",
    "value": " First ",
    "start": 1,
    "end": 12,
    "loc": {
      "start": {
        "line": 1,
        "column": 1
      },
      "end": {
        "line": 1,
        "column": 12
      }
    },
    "range": [
      1,
      12
    ]
  }
]
[
  {
    "type": "Block",
    "value": " HTML ",
    "start": 42,
    "end": 52,
    "loc": {
      "start": {
        "line": 4,
        "column": 19
      },
      "end": {
        "line": 4,
        "column": 29
      }
    },
    "range": [
      42,
      52
    ]
  }
]

Runtime

Node v16

Package manager

yarn v1

OS

macOS

Build and bundle tools

No response

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
wooormcommented, Apr 19, 2022

done

1reaction
wooormcommented, Apr 18, 2022

I’m not sure how I came up with the previous logic. I made a little algorithm locally that works and is much simpler. I’ll have to make the code pretty and add test it all, but should have it ready soon!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: The parameter loc has invalid values #156 - GitHub
Note that using lr=2.5e-4 will result in "Invalid Value" error for 2 games. The fix is to reduce the learning rate. That's why...
Read more >
Should LOC counting include tests and comments?
That said, if you have to use it, count sans comments and tests and ... The logical LOC has 2 significant advantages over...
Read more >
PREMIS Data Dictionary for Preservation Metadata -- version 2.0
Please send comments and questions to premis@loc.gov. ... Represents the information most preservation repositories need to know to preserve.
Read more >
Handling Maven Invalid LOC Header Error - Baeldung
In these situations, Maven builds throw an “invalid LOC header” error. The solution is to remove the corrupt jar from the repository. Let's...
Read more >
Fact Sheet: Reprimands, UIFs & Control Rosters
WHAT HAVE I DONE WRONG? You can get a LOR, LOA, or LOC for just about any failure to maintain standards of conduct,...
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