-
-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Labels
🌊 blocked/upstreamThis cannot progress before something external happens firstThis cannot progress before something external happens first👍 phase/yesPost is accepted and can be worked onPost is accepted and can be worked on🗄 area/interfaceThis affects the public interfaceThis affects the public interface🙆 yes/confirmedThis is confirmed and ready to be worked onThis is confirmed and ready to be worked on🦋 type/enhancementThis is great to haveThis is great to have
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
MDX VS Code Extension v1.8.9
Link to runnable example
No response
Steps to reproduce
Reproduction repo: https://github.com/karlhorky/repro-mdx-analyzer-missing-auto-import-intellisense
- Set up the
app-dir-mdxexample from Remco using the content below
(content contains intentional TypeScript errors)
mdx-components.tsx
import { MDXComponents } from 'mdx/types';
import { HTMLAttributes } from 'react';
type ZoomImageProps = {
alt: string;
};
function ZoomImage(props: ZoomImageProps) {
return <div>www</div>;
}
function CustomCodeSandBox(props: HTMLAttributes<HTMLDivElement>) {
return (
<div {...props} />
);
}
const components = {
ZoomImage,
CustomCodeSandBox,
} satisfies MDXComponents;
declare global {
type MDXProvidedComponents = typeof components;
}
export function useMDXComponents(): MDXProvidedComponents {
return components;
}app/message.mdx
<ZoomImage src="/logo.svg" alt="Logo" />
<CustomCodeSandBox template="react" />tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
]
},
"mdx": {
"checkMdx": true
},
"include": [
"next-env.d.ts",
"**/*.mdx",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
}- Observe the errors from the MDX VS Code extension appearing on a 1-character red squiggly the end of the file in VS Code instead of on the respective lines where the errors occur:

Expected behavior
In the screenshot above, I would expect that the 1st error would appear on line 47, covering the whole line, and the 2nd error would appear on line 49, covering the whole line
Actual behavior
In the screenshot above, the errors from the MDX VS Code extension appear on a 1-character red squiggly the end of the file in VS Code instead of on the respective lines where the errors occur
Runtime
No response
Package manager
No response
OS
macOS
Build and bundle tools
Next.js
Metadata
Metadata
Assignees
Labels
🌊 blocked/upstreamThis cannot progress before something external happens firstThis cannot progress before something external happens first👍 phase/yesPost is accepted and can be worked onPost is accepted and can be worked on🗄 area/interfaceThis affects the public interfaceThis affects the public interface🙆 yes/confirmedThis is confirmed and ready to be worked onThis is confirmed and ready to be worked on🦋 type/enhancementThis is great to haveThis is great to have