Skip to content

EPBDS-16211: lint the tooling, fail focused tests, coverage thresholds at what is measured, and the plan's stale lines - #203

Merged
AlexSamBY merged 1 commit into
masterfrom
plan-process-cleanup
Oct 9, 2026
Merged

AlexSamBY merged 1 commit into
masterfrom
plan-process-cleanup

Conversation

@AlexSamBY

Copy link
Copy Markdown
Member

What

The process half of the 2026-10-08 audit: lint for the code nobody linted, a gate against focused tests, coverage thresholds at what the suite covers, and the plan's stale lines.

Lint covers the tooling

npm run lint:js now runs over scripts/, e2e/ and the config files at the root, as well as src. That is 63 more files, under eslint-config-react-app's rules without the React, JSX and hooks ones (TOOLING_RULES in eslint.config.js). Each file gets the node, browser or jest globals of the place it runs. The first run found 16 problems:

  • Fixed, 11.
    • Seven unused names in the browser specs: five imports (DISMISSAL, TOUCH, tooltipA11yWiring, topmostAt, BUBBLE), and two bubble helpers nothing called. Their BUBBLE imports went with them.
    • scripts/jest-console-guard.js reassigned its buffer under a function created in a loop (no-loop-func). The buffer is now a constant array cleared in place, with the same behaviour.
    • The two webpack configs export a named value (import/no-anonymous-default-export).
    • A /* global globalThis */ redeclared a built-in, and is gone.
  • Configuration, 4.
    • document was undefined in scripts/fixtures/packed-browser-entry.js, which runs in a page; that file has browser globals now.
    • The hooks rules read a Playwright fixture's use as React's use; they are not applied to the tooling.
  • Suppressed, 1. A string of prose in scripts/wrapper-prop-curation.js names the ${id}-help template. The suppression states that reason.

A focused test fails lint

The ban covers it.only, describe.only, test.only, test.describe.only, test.concurrent.only, .only.each, fit and fdescribe. It applies in src/**/__tests__, scripts/__tests__, e2e/**/*.pw.js and e2e/**/*.packed.js.

A focused test runs alone: the rest of its file is skipped, and the run still passes. Jest has no --forbid-only, and Playwright's forbidOnly is set for CI only. eslint-plugin-jest is not installed, so the gate uses two core rules: no-restricted-properties on .only and no-restricted-globals on fit/fdescribe.

Coverage thresholds at what the suite measures

Each threshold is the measured value, rounded down to a whole percent (statements/branches/functions/lines):

  • global: 89/79/85/90 → 98/95/97/99;
  • rules.tsx: 89/76/98/91 → 96/87/100/98;
  • ten more entries rise by 1 to 3 points;
  • function.ts goes 96 → 100 on branches and 75 → 80 on functions, and its comment says why;
  • six files get entries of their own: documentHost.ts, formData.ts, errorMapping.ts, dataMapping.ts, popupScope.ts and lodash-lite.ts.

jest.config.js states the rule above the block: a change that covers less either covers what it adds or lowers the number in the same commit, saying why.

The plan's stale lines

13 lines in docs/UPGRADE-PLAN.md changed, each one in place, with a date and the evidence:

  • Sequencing (§6, §9.3, §9.9). "Never mix an upgrade with a refactor in one release" is recorded as not held. Nothing has been released since Phase 2 (the last tag is v0.34.3, 2026-08-12), and §9.2's hooks migration and §9.3's decomposition landed after it. §9.3's "do not start" and §9.9's sequencing get the dates the work was done.
  • §9.3 step 2. "STARTED" and "Still to extract" now name what §9.3 closed without extracting: transformConfig/toOpenLConfig and initSelectStatesFromData, still in rules.tsx.
  • R8. javascriptEnabled went on 2026-10-08, and size()/px() are called at 133 sites, not 186.
  • R10. The audit and the prop list are done. The owners' MINOR call overruled "anything dropped ⇒ major", and the migration notes are in the changelog.
  • Appendix B. The npm audit baseline was 0 on 2026-09-30 and 35 on 2026-10-06, and has not been re-measured since. The line also says why the "prop-types": pattern has a colon.
  • Appendix C.
    • The upstream form-stack line is qualified by F4's finding.
    • There are two cloneElement sites, not one.
    • prop-types is retired.
    • The React 19 box no longer contradicts itself.

Measured

Left for the owners

GitHub holds eight branches; merged PR branches are deleted on merge. Besides master, gh-pages and the three open PRs' branches, three remain:

Whether to delete the first two, and whether the third gets CI or a statement that 0.34 takes no more fixes, is not decided here.

🤖 Generated with Claude Code

…s at what is measured, and the plan's stale lines

The process half of the 2026-10-08 audit:
- lint:js covers scripts/, e2e/ and the root config files, 63 files, under eslint-config-react-app's
  rules without the React ones. Its first run found 16 problems: 11 fixed (seven unused names in the
  browser specs, the console guard's buffer, the webpack configs' anonymous default exports, a global
  directive that redeclared a built-in), 4 answered by the globals and the rule set, and 1, a string of
  prose that quotes a template, suppressed with its reason.
- A focused test (.only, fit, fdescribe) fails lint in every test location: jest has no --forbid-only.
- The coverage thresholds are the measured coverage, rounded down: global 89/79/85/90 -> 98/95/97/99,
  rules.tsx 89/76/98/91 -> 96/87/100/98, eleven more entries raised, and six files get entries of
  their own. A run in the local time zone and one in UTC agreed on every file.
- 13 plan lines: "never mix an upgrade with a refactor in one release" recorded as not held, what
  §9.3 step 2 left in rules.tsx, R8, R10, the npm audit baseline, and Appendix C's stale checks.
@AlexSamBY
AlexSamBY merged commit fb103bc into master Oct 9, 2026
7 checks passed
@AlexSamBY
AlexSamBY deleted the plan-process-cleanup branch October 9, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant