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.

Parse error on YAML headers

See original GitHub issue

Hi, I want to use this plugin for linting my Docz documentation written in MDX, but the plugin seems unable to parse the YAML headers used for configuration.

Example:

---
name: FollowReveal
route: /follow-reveal
---

# FollowReveal
...

Error:

1:3  error  Parsing error: Invalid left-hand side in prefix operation
> 1 | ---
    |   ^
  2 | name: FollowReveal
  3 | route: /follow-reveal
  4 | ---

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
JounQincommented, Jul 30, 2019

@cdfa You need to pass a custom parser, because the ast has been transformed by other parsers/plugins:

{
  "files": ["*.mdx"],
  "extends": ["plugin:@rxts/mdx/recommended"],
  "parserOptions": {
    "parser": "babel-eslint"
  }
}

However, there still is an error:

/Users/JounQin/Workspaces/GitHub/react-turn-reveal/index.mdx
  6:3  error  Parsing error: Unexpected token

> 1 | <!-- markdownlint-disable MD041 -->
    | ^

✖ 1 problem (1 error, 0 warnings)

I will fix it tonight.

0reactions
JounQincommented, Jul 30, 2019

@cdfa Please try v0.3.1

<del> Sorry, it is still buggy for:
<Playground style={{ display: "flex", justifyContent: "center" }}>
  {() => {
    const perspective = 400;
    return (
      <div style={{ position: "relative", perspective: perspective + "px" }}>
        <FollowReveal perspective={perspective}>
          <Front>More info</Front>
        </FollowReveal>
        <PlaceHolderImage />
      </div>
    );
  }}
</Playground>

Wait for a while. </del>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I get the following error: Could not parse YAML header
Your YAML is incorrect, title (maybe because you aligned the : after it with the one from the key above it), is indented...
Read more >
mapping values are not allowed in this context "source" ' - R ...
While attempting to knit together an RMarkdown - Bookdown Project - into PDF, I encounter this error: [pandoc warning] Could not parse YAML...
Read more >
Not sure where "yaml" error is coming from in RMarkdown
I'm doing an RMarkdown assignment on vectors and matrices for uni class. All my code chunks run fine, except when I try to...
Read more >
Fixing “virtual filesystem overlay file all-product-headers.yaml ...
This error could be really annoying, because it blocks the developer to use the lldb resources, such as po to verify values or...
Read more >
`po` command fails to work after importing XCFramework
build/all-product-headers.yaml' not found error: virtual filesystem overlay file '/Users/rakshitha/Library/Developer/Xcode/DerivedData/ ...
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