-
-
Notifications
You must be signed in to change notification settings - Fork 35
fix: set processor for flat config, prefer context.languageOptions.parserOptions
#593
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
Conversation
🦋 Changeset detectedLatest commit: e5fe7c1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures the MDX remark rule picks up parser options from ESLint’s flat config and registers the remark processor in the flat configuration.
- Destructure and merge
context.languageOptions.parserOptions
in theremark
rule - Add
processor: remark
and update imports in the flat config - Remove legacy
sourceType
andecmaVersion
settings from the flat config
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/eslint-plugin-mdx/src/rules/remark.ts | Merge context.languageOptions.parserOptions alongside parserOptions |
packages/eslint-plugin-mdx/src/configs/flat.ts | Import and apply the remark processor; remove old parser settings |
Comments suppressed due to low confidence (2)
packages/eslint-plugin-mdx/src/configs/flat.ts:21
- [nitpick] The new
processor
setting isn’t directly covered by existing tests; consider adding a test to ensure MDX files are passed through the remark processor as expected.
processor: remark,
packages/eslint-plugin-mdx/src/configs/flat.ts:12
- [nitpick] The flat config now omits
sourceType
andecmaVersion
that were previously set. If MDX parsing relies on ES modules or newer syntax, consider re-adding these underlanguageOptions
orparserOptions
.
languageOptions: {
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #593 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 19 19
Lines 273 272 -1
Branches 47 47
=========================================
- Hits 273 272 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Initial checklist
Description of changes
TODO