Skip to content

finding(devx): vitest.config.mts is walked by NO ESLint run in this repository -- .mts/.cts are in neither the rule-bearing globs nor ESLint's default lint set #8337

Description

@claude

Split out of objectui#7908, which measured the files ESLint walks with an empty rule set. This is the neighbouring class it cannot see: a file ESLint never walks at all.

The reading

Measured on fedfa3e4a with a real install, ESLint v10.8.1, via the ESLint Node API (isPathIgnored / calculateConfigForFile, the API half of --print-config):

vitest.config.mts   ->  isPathIgnored: true, config: undefined   (NOT WALKED)
playwright.config.ts ->  116 rules                               (control)
scripts/github-slug.mjs ->  0 rules, but WALKED                  (control, the #7908 class)

Three controls in one run, and the three answers are three different states. undefined is not "zero rules" — it is ESLint declining to look.

Why

In flat config a file is linted only if some config object's files matches it, plus the default set ESLint always lints, which is .js / .cjs / .mjs. Every rule-bearing object in eslint.config.js is scoped TS-and-TSX — spelled as a brace-expansion over those two extensions — and .mts / .cts are in neither that glob nor the default set. So the extension falls through both.

The population

One file today, repo-wide: vitest.config.mts. There are no .cts files. Counted with the same walk objectui#7908's gate uses: 4440 files walked, and this one is outside all of them.

It is not a big population, but it is not a trivial file either — it defines every project, include glob and setup file the entire test run uses, and it is the one config in this repository that no lint run has ever read.

Why this is filed rather than repaired

objectui#7908's dispatch scoped that card to making vacuity visible and explicitly left rule-STRENGTH decisions out. Widening the config's files to reach .mts is a strength decision of exactly that kind: it is one line, but its red set is UNMEASURED, and the same objection applies as for the .js family. It also cannot be caught by #7908's gate by construction — that gate reports files ESLint walks, and this file is not one of them.

Two ways to settle it

  1. Widen the glob — add .mts / .cts to the rule-bearing files entries, measure the red set first.
  2. Gate the gap — extend check:lint-rule-coverage with a second predicate over source extensions ESLint reaches for NEITHER reason, so a .mts or .cts added later is reported instead of being silently outside every run. That is a real widening of that gate's subject and deserves its own decision.

Filed unassigned by the objectui#7908 implementation session. Generated by Claude Code, session session_01FhBNJcLRZLe8M87VcUgpKr.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repopm:queuepriority:p3tooling

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions