mdx-js/mdx-analyzer

Cannot find name 'frontmatter' from inside the mdx file

TeamAcarup opened this issue · 4 comments

Initial checklist

Affected packages and versions

VSCode 1.89.1 / Mdx Analyser v1.8.7

Link to runnable example

No response

Steps to reproduce

Plugins used: "remark-frontmatter", "remark-gfm"

  1. Create a mdx file with frontmatter like shown below
---
title: "Title example"
description: "Example"
---

# {frontmatter.title}

Expected behavior

The frontmatter object should be recognised.

Actual behavior

The following error appears:

Cannot find name 'frontmatter'. ts-plugin(2304)

Runtime

Node v20

Package manager

npm v9

OS

Windows

Build and bundle tools

Remix

Duplicate of #297

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

Hi! Thanks for taking the time to contribute!

Because we treat issues as our backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn’t an exact duplicate but is closely related.

Thanks,
— bb

remark-mdx-frontmatter adds this variable.