[codex] fix MDX global component no-undef lint#343
Conversation
🦋 Changeset detectedLatest commit: 9516556 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughAdds a shared helper ( ChangesMDX global components declared in ESLint config
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #343 +/- ##
==========================================
+ Coverage 53.88% 54.27% +0.39%
==========================================
Files 61 63 +2
Lines 1520 1555 +35
Branches 472 482 +10
==========================================
+ Hits 819 844 +25
- Misses 542 550 +8
- Partials 159 161 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Root Cause
After the ESLint 10 upgrade, JSX component identifiers in MDX are included in the scope analysis used by
no-undef. Doom injects components such asOverview,Steps,K8sCrd, andExternalSiteLinkthrough Rspressmarkdown.globalComponents, so document authors do not import them locally. Without declaring those names as globals,doom lintreports valid MDX component usage as undefined.Validation
yarn test packages/doom/test/eslint.spec.tsyarn buildyarn eslint packages/doom/src/eslint.ts packages/doom/src/plugins/global/index.ts packages/doom/src/plugins/global/components.ts packages/doom/test/eslint.spec.tsyarn doom lint fixture-docs --no-cspell -g 'en/test/managedtap.mdx'no-undeferrors are goneNotes
Clean vendor validation also shows independent failures from
doom-lint-no-legacy-os-nameson currentaml-docsandacp-docsmaster content. That rule was introduced separately in@alauda/doom@2.5.3and is not part of the ESLint 10 global component regression fixed here.Summary by CodeRabbit
New Features
Bug Fixes