Skip to content

What replaces the react-app/jest lint preset #291

Closed

Description

@jtklein-agents

Question

.eslintrc.cjs extends react-app/jest, which sets Jest globals and Jest lint rules. With Jest gone, is it replaced by a Vitest ESLint plugin, by a hand-written globals entry, or by nothing? The map's Notes require a decision for any package beyond vitest.

Activity

  1. added
    wayfinder:grilling
    on Nov 22, 2026
  2. jtklein-agents commented on Nov 22, 2026

    @jtklein-agents
    OwnerAuthor

    Context from Vitest globals or explicit imports in every test file: tests import their names from vitest and globals stays off, so the replacement for react-app/jest does not need to supply globals. What is left to decide here is whether Vitest lint rules are wanted at all.

  3. jtklein-agents commented on Nov 22, 2026

    @jtklein-agents
    OwnerAuthor

    Resolution

    Nothing replaces it. The spec removes react-app/jest from extends in .eslintrc.cjs and adds no Vitest lint plugin.

    • Why: tests import their names from vitest, so the preset's Jest globals are not needed. Its 19 testing-library/* rules guard a library this repo does not use. A Vitest plugin would be a new package on a lint stack (ESLint 8, legacy config) whose replacement is already out of scope for this map.
    • What is lost: jest/valid-expect, jest/valid-expect-in-promise, jest/no-conditional-expect and jest/no-identical-title. TypeScript and Vitest 5's own failure on an unawaited async assertion cover part of that, not all.
    • Follow-on edit the spec carries: delete the five // eslint-disable-next-line testing-library/no-unnecessary-act comments (src/app/App.test.js, src/app/unhandledError.test.js, src/app/droppedFile.test.js, and two in src/app/components/ErrorDialog.test.js). ESLint reports a disable comment for a rule it does not know, so they would fail yarn lint.
    • Vitest lint rules are out of scope for this map; they belong with the ESLint config replacement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

wayfinder:grilling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions