Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support strict type checking in MDX #387

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Support strict type checking in MDX #387

merged 1 commit into from
Jan 20, 2024

Conversation

remcohaszing
Copy link
Member

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)
  • If applicable, I’ve added docs and tests

Description of changes

The MDX language service now accepts the option checkMdx. When this is enabled, it tells TypeScript to type check the virtual JSX by inserting a @ts-check comment. The language server reads this as the option mdx.checkMdx from tsconfig.json.

Closes #352

The MDX language service now accepts the option `checkMdx`. When this
is enabled, it tells TypeScript to type check the virtual JSX by
inserting a `@ts-check` comment. The language server reads this as the
option `mdx.checkMdx` from `tsconfig.json`.

Closes #352
@remcohaszing remcohaszing added 🦋 type/enhancement This is great to have 🗄 area/interface This affects the public interface 👍 phase/yes Post is accepted and can be worked on labels Jan 20, 2024
Copy link

changeset-bot bot commented Jan 20, 2024

🦋 Changeset detected

Latest commit: 9d51f5e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@mdx-js/language-service Patch
@mdx-js/language-server Patch
vscode-mdx Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This comment has been minimized.

@remcohaszing remcohaszing added the 🧒 semver/minor This is backwards-compatible change label Jan 20, 2024
@remcohaszing remcohaszing merged commit 4070c63 into main Jan 20, 2024
13 checks passed
@remcohaszing remcohaszing deleted the check-mdx branch January 20, 2024 11:36

This comment has been minimized.

@github-actions github-actions bot mentioned this pull request Jan 20, 2024
@remcohaszing remcohaszing added the 💪 phase/solved Post is done label Jan 20, 2024
@github-actions github-actions bot removed the 👍 phase/yes Post is accepted and can be worked on label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 🧒 semver/minor This is backwards-compatible change 🦋 type/enhancement This is great to have
Development

Successfully merging this pull request may close these issues.

Add option to force enable TypeScript option checkJs
1 participant