frontmatter is targeted
See original GitHub issueSubject 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
- clone https://github.com/webpack/webpack.js.org
- 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:
- Created 2 years ago
- Comments:16 (15 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wooorm Does the plugins order matter? In
eslint-mdx
, it usesremark-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.@chenxsan
See https://github.com/mdx-js/eslint-mdx/issues/336#issuecomment-903066561,
remark-frontmatter@2
is required.