Skip to content

tools: run eslint on mdx files #92324

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

Merged
merged 6 commits into from
May 28, 2025
Merged

tools: run eslint on mdx files #92324

merged 6 commits into from
May 28, 2025

Conversation

JonasBa
Copy link
Member

@JonasBa JonasBa commented May 27, 2025

Enable eslint linting for mdx files. Currently with type aware linting disabled as MDX doesn't support TS expressions

@JonasBa JonasBa requested a review from a team May 27, 2025 16:29
@JonasBa JonasBa requested review from a team as code owners May 27, 2025 16:29
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 27, 2025
Comment on lines +41 to +43
// Exclude MDX files from type-aware linting
// https://github.com/orgs/mdx-js/discussions/2454
const MDXIgnore = ['**/*.mdx'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this is also used in plugin/typescript-eslint/custom which should not include type-aware rules

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to update the comment, it should say typescript linting.

<figure>
export function ExampleCard({imgSrc, text, isPositive}) {
return (
<figure>
<ExampleImg src={imgSrc} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is prettier not being applied either?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this PR not yet, I added it in a separate PR

@JonasBa JonasBa merged commit 2ee7e94 into master May 28, 2025
39 checks passed
@JonasBa JonasBa deleted the jb/tooling/mdx-eslint branch May 28, 2025 17:55
Copy link

codecov bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #92324      +/-   ##
==========================================
- Coverage   87.91%   86.73%   -1.19%     
==========================================
  Files       10209    10199      -10     
  Lines      584833   584050     -783     
  Branches    22686    22643      -43     
==========================================
- Hits       514185   506596    -7589     
- Misses      70226    77033    +6807     
+ Partials      422      421       -1     

billyvg pushed a commit that referenced this pull request May 28, 2025
Enable eslint linting for mdx files. Currently with type aware linting
disabled as MDX doesn't support TS expressions

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants