Skip to content

Bug: v8 RuleTester crashes on ESLint >=9.5.0 #9676

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

rule-tester

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

When I set up a very standard usage of @typescript-eslint/rule-tester@8.0.0-alpha.59 with eslint@9.5.0 in Vitest, test runs crash with:

 FAIL  src/no-loop-over-enum.test.ts > no-loop-over-enum > invalid >
          enum Values { value }
          for (const a in Values) {}

TypeError: Cannot read properties of undefined (reading 'parse')
 ❯ parse node_modules/eslint/lib/linter/linter.js:906:29
 ❯ Linter._verifyWithFlatConfigArrayAndWithoutProcessors node_modules/eslint/lib/linter/linter.js:1660:33
 ❯ Linter._verifyWithFlatConfigArray node_modules/eslint/lib/linter/linter.js:2017:21
 ❯ Linter.verify node_modules/eslint/lib/linter/linter.js:1492:61
 ❯ RuleTester.runRuleForItem node_modules/@typescript-eslint/rule-tester/src/RuleTester.ts:710:33
 ❯ RuleTester.#testInvalidTemplate node_modules/@typescript-eslint/rule-tester/src/RuleTester.ts:862:25
 ❯ node_modules/@typescript-eslint/rule-tester/src/RuleTester.ts:513:40

This does not reproduce with eslint@9.4.0.

Full repro on: https://github.com/JoshuaKGoldberg/repros/tree/repro-rule-tester-eslint-parse-error

Additional Info

No response

Metadata

Metadata

Labels

bugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: rule-testerIssues related to the @typescript-eslint/rule-tester packageteam assignedA member of the typescript-eslint team should work on this.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy