{"id":14108814,"url":"https://github.com/mdx-js/mdx-analyzer","last_synced_at":"2025-05-15T01:06:35.544Z","repository":{"id":35804925,"uuid":"199611802","full_name":"mdx-js/mdx-analyzer","owner":"mdx-js","description":"MDX extension for Visual Studio Code","archived":false,"fork":false,"pushed_at":"2025-04-13T16:43:48.000Z","size":1792,"stargazers_count":384,"open_issues_count":21,"forks_count":21,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-13T23:53:54.559Z","etag":null,"topics":["intellisense","mdx","mdx-js","vscode","vscode-extension","vscode-mdx"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdx-js.png","metadata":{"funding":{"github":"unifiedjs","open_collective":"unified","thanks_dev":"u/gh/mdx-js"},"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-30T08:43:18.000Z","updated_at":"2025-04-13T15:09:57.000Z","dependencies_parsed_at":"2023-10-23T13:30:32.819Z","dependency_job_id":"81f3c112-51bc-4e3b-a7bf-92fc013d1f1c","html_url":"https://github.com/mdx-js/mdx-analyzer","commit_stats":{"total_commits":335,"total_committers":12,"mean_commits":"27.916666666666668","dds":"0.29850746268656714","last_synced_commit":"b2a56a58db136292a51a40e97c5b7d57a0c371e5"},"previous_names":["mdx-js/vscode-mdx"],"tags_count":79,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdx-js%2Fmdx-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdx-js%2Fmdx-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdx-js%2Fmdx-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdx-js%2Fmdx-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdx-js","download_url":"https://codeload.github.com/mdx-js/mdx-analyzer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254041,"owners_count":22039792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["intellisense","mdx","mdx-js","vscode","vscode-extension","vscode-mdx"],"created_at":"2024-08-14T10:01:49.416Z","updated_at":"2025-05-15T01:06:30.527Z","avatar_url":"https://github.com/mdx-js.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified","https://thanks.dev/u/gh/mdx-js"],"categories":["JavaScript"],"sub_categories":[],"readme":"# MDX Analyzer\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\nThis repository contains the code to provide editor tooling support for [MDX][].\n\n## Contents\n\n* [Workspaces](#workspaces)\n* [Use](#use)\n  * [TypeScript](#typescript)\n  * [Plugins](#plugins)\n* [Contribute](#contribute)\n* [Sponsor](#sponsor)\n* [License](#license)\n\n## Workspaces\n\nThis repository contains the following workspaces:\n\n* [`@mdx-js/language-service`][] provides utilities to integrate MDX into\n  [Volar][].\n* [`@mdx-js/language-server`][] provides an MDX language server using the\n  [Language Server Protocol][].\n* [`@mdx-js/typescript-plugin`][] provides a [TypeScript plugin][] to integrate\n  MDX in TypeScript editors.\n* [`vscode-mdx`][] integrates the MDX language server into\n  [Visual Studio Code][], but also provides some Visual Studio Code specific\n  features such as syntax highlighting.\n\n## Use\n\n### TypeScript\n\n[MDX][] doesn’t support TypeScript syntax, but it does support\n[types in JSDoc][jsdoc].\n\nMDX type checking support is similar to JavaScript support.\nBy default, type hints are subtle.\nTo enable strict type checking, you need to specify `mdx.checkMdx` in\n`tsconfig.json`:\n\n```jsonc\n{\n  \"compilerOptions\": {\n    // …\n  },\n  \"mdx\": {\n    // Enable strict type checking in MDX files.\n    \"checkMdx\": true\n  }\n}\n```\n\n#### `Props`\n\nThe `Props` type is a special type which is used to determine the type used for\n[`props`][props].\nFor example:\n\n```mdx\n{/**\n  * @typedef Props\n  * @property {string} name\n  *   Who to greet.\n  */}\n\n# Hello {props.name}\n```\n\n#### `MDXProvidedComponents`\n\nThe special type `MDXProvidedComponents` is used to determine which components\nare [provided][provider].\nFor example:\n\n```mdx\n{/**\n  * @typedef MDXProvidedComponents\n  * @property {typeof import('../components/Planet.js').Planet} Planet\n  */}\n\n\u003cPlanet name=\"Earth\" /\u003e\n```\n\nYou can also define this type externally, and import it into your MDX file.\nBased on a [Next.js][next mdx] example:\n\n```typescript\n// mdx-components.ts\nimport { Planet } from './components/Planet.js'\n\nconst components = {\n  Planet\n}\n\nexport type MDXProvidedComponents = typeof components\n\nexport function useMDXComponents(): MDXProvidedComponents {\n  return components\n}\n```\n\nThen in your MDX file:\n\n```mdx\n{/**\n  * @import {MDXProvidedComponents} from '../mdx-components.js'\n  */}\n\n\u003cPlanet name=\"Earth\" /\u003e\n```\n\nAnother alternative is to define the `MDXProvidedComponents` type globally.\nThis way you don’t have to define `MDXProvidedComponents` in each MDX file.\nBased on a [Next.js][next mdx] example:\n\n```typescript\n// mdx-components.ts\nimport { Planet } from './components/Planet.js'\n\nconst components = {\n  Planet\n}\n\ndeclare global {\n  type MDXProvidedComponents = typeof components\n}\n\nexport function useMDXComponents(): MDXProvidedComponents {\n  return components\n}\n```\n\nNow you can write the following MDX with full type safety anywhere:\n\n```mdx\n\u003cPlanet name=\"Earth\" /\u003e\n```\n\n### Plugins\n\nThis extension supports remark parser plugins.\nPlugins can be defined in an array of strings or string / options tuples.\nThese plugins can be defined in `tsconfig.json` and will be resolved relative to\nthat file.\nTransformers such as [`remark-mdx-frontmatter`][remark-mdx-frontmatter] are not\nsupported yet.\nSupport is tracked in\n[#297](https://github.com/mdx-js/mdx-analyzer/issues/297).\n\nFor example, to support [frontmatter][] with YAML and TOML and [GFM][]:\n\n```jsonc\n{\n  \"compilerOptions\": {\n    // …\n  },\n  \"mdx\": {\n    \"plugins\": [\n      [\n        \"remark-frontmatter\",\n        [\"toml\", \"yaml\"]\n      ],\n      \"remark-gfm\"\n    ]\n  }\n}\n```\n\nFor a more complete list, see [remark plugins][].\n\n## Contribute\n\nSee [§ Contribute][contribute] on our site for ways to get started.\nSee [§ Support][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## Sponsor\n\nSee [§ Sponsor][sponsor] on our site for how to help financially.\n\n\u003ctable\u003e\n\u003ctr valign=\"middle\"\u003e\n\u003ctd width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\"\u003e\n  \u003ca href=\"https://vercel.com\"\u003eVercel\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://vercel.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/14985020?s=256\u0026v=4\" width=\"128\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\"\u003e\n  \u003ca href=\"https://motif.land\"\u003eMotif\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://motif.land\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/74457950?s=256\u0026v=4\" width=\"128\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\"\u003e\n  \u003ca href=\"https://www.hashicorp.com\"\u003eHashiCorp\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://www.hashicorp.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/761456?s=256\u0026v=4\" width=\"128\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\"\u003e\n  \u003ca href=\"https://www.gitbook.com\"\u003eGitBook\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://www.gitbook.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/7111340?s=256\u0026v=4\" width=\"128\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\"\u003e\n  \u003ca href=\"https://www.gatsbyjs.org\"\u003eGatsby\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://www.gatsbyjs.org\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/12551863?s=256\u0026v=4\" width=\"128\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"middle\"\u003e\u003c/tr\u003e\n\u003ctr valign=\"middle\"\u003e\n\u003ctd width=\"20%\" align=\"center\" rowspan=\"2\" colspan=\"2\"\u003e\n  \u003ca href=\"https://www.netlify.com\"\u003eNetlify\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003c!--OC has a sharper image--\u003e\n  \u003ca href=\"https://www.netlify.com\"\u003e\u003cimg src=\"https://images.opencollective.com/netlify/4087de2/logo/256.png\" width=\"128\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"10%\" align=\"center\"\u003e\n  \u003ca href=\"https://www.coinbase.com\"\u003eCoinbase\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://www.coinbase.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/1885080?s=256\u0026v=4\" width=\"64\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"10%\" align=\"center\"\u003e\n  \u003ca href=\"https://themeisle.com\"\u003eThemeIsle\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://themeisle.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/58979018?s=128\u0026v=4\" width=\"64\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"10%\" align=\"center\"\u003e\n  \u003ca href=\"https://expo.io\"\u003eExpo\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://expo.io\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/12504344?s=128\u0026v=4\" width=\"64\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"10%\" align=\"center\"\u003e\n  \u003ca href=\"https://boostnote.io\"\u003eBoost Note\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://boostnote.io\"\u003e\u003cimg src=\"https://images.opencollective.com/boosthub/6318083/logo/128.png\" width=\"64\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"10%\" align=\"center\"\u003e\n  \u003ca href=\"https://markdown.space\"\u003eMarkdown Space\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://markdown.space\"\u003e\u003cimg src=\"https://images.opencollective.com/markdown-space/e1038ed/logo/128.png\" width=\"64\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"10%\" align=\"center\"\u003e\n  \u003ca href=\"https://www.holloway.com\"\u003eHolloway\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://www.holloway.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/35904294?s=128\u0026v=4\" width=\"64\"\u003e\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd width=\"10%\"\u003e\u003c/td\u003e\n\u003ctd width=\"10%\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr valign=\"middle\"\u003e\n\u003ctd width=\"100%\" align=\"center\" colspan=\"8\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://opencollective.com/unified\"\u003e\u003cstrong\u003eYou?\u003c/strong\u003e\u003c/a\u003e\n  \u003cbr\u003e\u003cbr\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## License\n\n[MIT][] © [JounQin][]@[1stG.me][]\n\n[1stg.me]: https://www.1stg.me\n\n[`@mdx-js/language-server`]: https://github.com/mdx-js/mdx-analyzer/tree/main/packages/language-server\n\n[`@mdx-js/language-service`]: https://github.com/mdx-js/mdx-analyzer/tree/main/packages/language-service\n\n[`@mdx-js/typescript-plugin`]: https://github.com/mdx-js/mdx-analyzer/tree/main/packages/typescript-plugin\n\n[`vscode-mdx`]: https://github.com/mdx-js/mdx-analyzer/tree/main/packages/vscode-mdx\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[build]: https://github.com/mdx-js/mdx-analyzer/actions\n\n[build-badge]: https://github.com/mdx-js/mdx-analyzer/workflows/main/badge.svg\n\n[chat]: https://github.com/mdx-js/mdx/discussions\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[coc]: https://github.com/mdx-js/.github/blob/main/code-of-conduct.md\n\n[collective]: https://opencollective.com/unified\n\n[contribute]: CONTRIBUTING.md\n\n[coverage]: https://codecov.io/github/mdx-js/mdx-analyzer\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/mdx-js/mdx-analyzer/main.svg\n\n[frontmatter]: https://github.com/remarkjs/remark-frontmatter\n\n[gfm]: https://github.com/remarkjs/remark-gfm\n\n[jounqin]: https://GitHub.com/JounQin\n\n[jsdoc]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html\n\n[language server protocol]: https://microsoft.github.io/language-server-protocol/\n\n[mdx]: https://github.com/mdx-js/mdx\n\n[mit]: http://opensource.org/licenses/MIT\n\n[next mdx]: https://nextjs.org/docs/pages/building-your-application/configuring/mdx\n\n[props]: https://mdxjs.com/docs/using-mdx/#props\n\n[provider]: https://mdxjs.com/docs/using-mdx/#mdx-provider\n\n[remark plugins]: https://github.com/remarkjs/remark/blob/main/doc/plugins.md\n\n[remark-mdx-frontmatter]: https://github.com/remcohaszing/remark-mdx-frontmatter\n\n[sponsor]: https://mdxjs.com/community/sponsor/\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[support]: https://mdxjs.com/community/support/\n\n[typescript plugin]: https://www.typescriptlang.org/tsconfig#plugins\n\n[visual studio code]: https://code.visualstudio.com/\n\n[volar]: https://volarjs.dev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdx-js%2Fmdx-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdx-js%2Fmdx-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdx-js%2Fmdx-analyzer/lists"}