layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

[Chore] ESLint MDX config targets an empty directory, leaving 1,138 MDX files unlinted

Open Ayush-1812 opened this issue 3 months ago • 7 comments

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:

  1. No linting where most of the content is. Over a thousand MDX files, including every Sistent component doc, are exempt from lint entirely.
  2. 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 three Assigning to rvalue parse 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 to master (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)

Ayush-1812 avatar Aug 23 '26 04:08 Ayush-1812

I would like to work on this issue. Could you please assign it to me?

taksh-kamble avatar Aug 24 '26 08:08 taksh-kamble

I am also interested in working on this issue. Could you plz assign it to me?

aroosaazeem6-dev avatar Aug 27 '26 09:08 aroosaazeem6-dev

Hi @Ayush-1812, are you working on this issue currently?

Prasad8830 avatar Sep 01 '26 09:09 Prasad8830

yes, i am working on this issue

Ayush-1812 avatar Sep 02 '26 03:09 Ayush-1812

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.

ritzorama avatar Nov 18 '26 11:11 ritzorama

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!

ritzorama avatar Nov 25 '26 11:11 ritzorama

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.

ritzorama avatar Dec 02 '26 11:12 ritzorama