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.

frontmatter is targeted

See original GitHub issue

Subject of the issue

Say I have a MDX file with this frontmatter:

---
title: Code Splitting
related:
  - title: <link rel="prefetch/preload" > in webpack
    url: https://medium.com/webpack/link-rel-prefetch-preload-in-webpack-51a52358f84c
---

Note that the <link > was not closed.

Now eslint would report Parsing error: Expected corresponding JSX closing tag for <link>. Which seems wrong to me. A related comment is here https://github.com/webpack/webpack.js.org/pull/5312#issuecomment-902705944.

Your environment

  • OS:
  • Packages:
  • Env:

Steps to reproduce

  1. clone https://github.com/webpack/webpack.js.org
  2. open src/content/guides/code-splitting.mdx and replace the /> with > in the related part of frontmatter.

FYI, I’ve tried the latest version https://github.com/mdx-js/eslint-mdx/issues/334#issuecomment-898999220 with no luck.

Expected behaviour

No error.

Actual behaviour

An error was shown because frontmatter is targetted.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
JounQincommented, Aug 21, 2021

@wooorm Does the plugins order matter? In eslint-mdx , it uses remark-mdx first then other user customed plugins.


OK, I find the problem, the custom remark config is only used for mdx/remark rule, this can be improved.

0reactions
JounQincommented, Aug 21, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Front Matter - Hugo
Hugo allows you to add front matter in yaml, toml, or json to your content files. ... allowing for multiple cascade values targeting...
Read more >
Frontmatter in a PDF target - MadCap Software Forums
So, I have two separate page layouts, but it seems that one should be enough with custom pages added for the front matter....
Read more >
YAML front matter - Assemble.io
title: YAML Front Matter description: A very simple way to add structured data to a ... set to false to exclude a file...
Read more >
Front Matter | Target-Setting Methods and Data Management ...
2010. Target-Setting Methods and Data Management to Support Performance-Based Resource Allocation by Transportation Agencies - Volume I: Research Report, and ...
Read more >
Templates | Hygen
A hygen template is a header of a markdown-like frontmatter and a body of an ejs ... By default templates are 'added' to...
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