[Chore] ESLint MDX config targets an empty directory, leaving 1,138 MDX files unlinted
Description
eslint.config.js:148 registers eslint-mdx for two globs:
{
files: ["content-learn/**/*.mdx", "src/pages/**/*.mdx"],
languageOptions: { parser: mdxParser, ... },
processor: mdxPlugin.createRemarkProcessor(),
...
}
Neither glob reflects where the site's MDX actually lives today:
| Glob / tree | .mdx files matched |
|---|---|
content-learn/**/*.mdx |
61 |
src/pages/**/*.mdx |
0 |
src/collections/**/*.mdx (unmatched) |
1,138 (138 of them Sistent component docs) |
src/pages contains no MDX at all, and src/collections — blog posts, workshops, programs, and all Sistent component documentation — matches no files entry in the flat config. Under ESLint v9 flat config, files not matched by any config object are skipped when linting a directory, so npm run checklint never inspects them.
Two consequences:
- No linting where most of the content is. Over a thousand MDX files, including every Sistent component doc, are exempt from lint entirely.
- Confusing parse errors for contributors and review bots. ESLint does lint files passed explicitly on the command line, even unmatched ones — falling back to the default JS parser, which cannot parse MDX. Anyone running
eslint <changed-file>.mdx, and automated reviewers that lint changed files, get threeAssigning to rvalueparse errors per file. This surfaced on #7990, where it was reported as a failure against new documentation despite reproducing identically on existing docs already merged tomaster(e.g.src/collections/sistent/components/table/code.mdx).
Expected Behavior
The MDX config block covers the trees that actually contain MDX — at minimum adding src/collections/**/*.mdx — and the dead src/pages/**/*.mdx glob is dropped or corrected.
This should be treated as its own change rather than folded into a content PR: switching 1,138 files from unlinted to linted will surface a backlog of findings, and the rule set for the MDX block will likely need tuning (the current block only disables four react/* rules) before it can pass CI. A staged approach — enable the glob, assess the output, tune rules or add narrowly-scoped ignores, then wire it into checklint — is probably the sanest path.
Screenshots
N/A
Environment:
- Host OS: any
- Browser: N/A (build tooling)
I would like to work on this issue. Could you please assign it to me?
I am also interested in working on this issue. Could you plz assign it to me?
Hi @Ayush-1812, are you working on this issue currently?
yes, i am working on this issue
Checking in... it has been awhile since we've heard from you on this issue. Are you still working on it? Please let us know and please don't hesitate to contact a MeshMate (https://meshery.io/community/meshmates/) or any other community member (https://meshery.io/community) for assistance.
Hi @Ayush-1812, just following up on this issue. If we do not hear from you within the next 7 days, we will unassign it so someone else can pick it up. Thanks!
Hi @Ayush-1812, thanks for your interest in this issue. Since we have not heard from you, we are unassigning it so someone else can pick it up. You are welcome to ask for it again if you would like to work on it.